printStackTrace method
Prints the error along with its stack trace.
Implementation
void printStackTrace([bool useErrorPrint = false]) {
if (useErrorPrint) {
stderr.write(this);
} else {
print(this);
}
if (stackTrace != null) {
if (useErrorPrint) {
stderr.write(stackTrace);
} else {
print(stackTrace);
}
}
}