Navigation Menu

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IsolateSpawnException has an ugly toString #12689

Closed
nex3 opened this issue Aug 23, 2013 · 3 comments
Closed

IsolateSpawnException has an ugly toString #12689

nex3 opened this issue Aug 23, 2013 · 3 comments
Labels
area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. library-isolate

Comments

@nex3
Copy link
Member

nex3 commented Aug 23, 2013

Here's an example of an IsolateSpawnException that I got recently while testing barback:

    IsolateSpawnException: '404 Not Found'http://localhost:8080/packages/app/src/html_rewriter.dart': Error: line 2 pos 1: library handler failed
    import 'asdfkajsdasfdsadf';
    ^
    'file:///tmp/temp_dir1_WfHaIU/runInIsolate.dart': Error: line 1 pos 1: library handler failed
    import "http://localhost:8080/packages/app/src/html_rewriter.dart";import 'dart:async';
    ^'

It's very difficult to parse visually. Why is the URL jammed right up against the '404 Not Found' message? Why is there a random single quote after the final caret?

@nex3
Copy link
Member Author

nex3 commented Aug 28, 2013

It would also be helpful if there were metadata properties attached to the exception that made it possible to know, for example, which import failed to load.

@lrhn
Copy link
Member

lrhn commented Nov 18, 2013

The single quote is matching the one before "404", so it's not random, just ... misunderstood.
It doesn't work very well if the content string is multi-line and/or contains single quotes on its own.
We should do something more clever when the the content string is complex.

@lrhn
Copy link
Member

lrhn commented Oct 7, 2014

I'm removing the single quotes around the message, they are only adding confusion.

The entire message comes from the underlying system, so missing spaces or newlines comes from there.
The error message for a 404 error looks better now.


Added Fixed label.

@nex3 nex3 added Type-Defect area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. library-isolate labels Oct 7, 2014
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. library-isolate
Projects
None yet
Development

No branches or pull requests

3 participants