FutureUnhandledException class
Wraps unhandled exceptions provided to Completer.completeException. It is used to show both the error message and the stack trace for unhandled exceptions.
class FutureUnhandledException implements Exception { /** Wrapped exception. */ var source; /** Trace for the wrapped exception. */ Object stackTrace; FutureUnhandledException(this.source, this.stackTrace); String toString() { return 'FutureUnhandledException: exception while executing Future\n ' '${source.toString().replaceAll("\n", "\n ")}\n' 'original stack trace:\n ' '${stackTrace.toString().replaceAll("\n","\n ")}'; } }
Implements
Constructors
Properties
var source #
Wrapped exception.
var source;
Methods
String toString() #
Returns a string representation of this object.
String toString() { return 'FutureUnhandledException: exception while executing Future\n ' '${source.toString().replaceAll("\n", "\n ")}\n' 'original stack trace:\n ' '${stackTrace.toString().replaceAll("\n","\n ")}'; }