Welcome to collectivesolver - Programming & Software Q&A with code examples. A website with trusted programming answers. All programs are tested and work.

Contact: aviboots(AT)netvision.net.il

Buy a domain name - Register cheap domain names from $0.99 - Namecheap

Scalable Hosting That Grows With You

Secure & Reliable Web Hosting, Free Domain, Free SSL, 1-Click WordPress Install, Expert 24/7 Support

Semrush - keyword research tool

Boost your online presence with premium web hosting and servers

Disclosure: My content contains affiliate links.

39,926 questions

51,859 answers

573 users

How to print exception and StackTrace in Dart

1 Answer

0 votes
main() {
    try {
        throw "throw exception";
    } catch (e, s) {
        print("Exception: $e");
        print("StackTrace: $s");
    }
}




/*
run:

Exception: throw exception
StackTrace: #0      main (file:///home/jdoodle.dart:3:9)
#1      _delayEntrypointInvocation.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:283:19)
#2      _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:184:12)

*/

 



answered Oct 22, 2022 by avibootz

Related questions

2 answers 123 views
123 views asked Oct 21, 2022 by avibootz
3 answers 198 views
198 views asked Mar 13, 2023 by avibootz
1 answer 166 views
166 views asked Oct 22, 2022 by avibootz
1 answer 104 views
104 views asked Oct 21, 2022 by avibootz
1 answer 104 views
1 answer 122 views
122 views asked Oct 12, 2022 by avibootz
...