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

Show more stack trace information #2668

Closed
johnpryan opened this issue Oct 10, 2023 · 2 comments
Closed

Show more stack trace information #2668

johnpryan opened this issue Oct 10, 2023 · 2 comments
Labels
area-error-messaging closed-duplicate Closed in favor of an existing report P1 A high priority bug; for example, a single project is unusable or has many test failures type-ux A user experience or user interface related issue

Comments

@johnpryan
Copy link
Contributor

Exceptions in DartPad should contain more information like the line number and full stack trace.

Example

This program throws a TypeError:

void main() {
  var map = <String, dynamic>{};
  String s = map['foo'];
  print(s);
}
Unhandled exception:
type 'Null' is not a subtype of type 'String'
#0      main (file:///Users/ryjohn/Desktop/foo/bin/foo.dart:3:10)
#1      _delayEntrypointInvocation.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:296:19)
#2      _RawReceivePort._handleMessage (dart:isolate-patch/isolate_patch.dart:189:12)

But in DartPad, only the first line is printed:

Uncaught Error: TypeError: null: type 'JSNull' is not a subtype of type 'String'
@johnpryan johnpryan added P1 A high priority bug; for example, a single project is unusable or has many test failures area-error-messaging labels Oct 10, 2023
@devoncarew
Copy link
Member

Note that in preview.dartpad.dev, we now just show: Script error.; we should make sure the error handling at least matches the current dartpad.dev.

@johnpryan johnpryan added the type-ux A user experience or user interface related issue label Jan 8, 2024
@parlough
Copy link
Member

Closing in favor of #3008.

@parlough parlough closed this as not planned Won't fix, can't repro, duplicate, stale Jun 17, 2024
@parlough parlough added the closed-duplicate Closed in favor of an existing report label Jun 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-error-messaging closed-duplicate Closed in favor of an existing report P1 A high priority bug; for example, a single project is unusable or has many test failures type-ux A user experience or user interface related issue
Projects
None yet
Development

No branches or pull requests

3 participants