printCaught static method
Prints a caught exception with its stack trace.
Parameters:
msg: Description messageex: The caught exceptionstackTrace: Optional stack trace
Uses either dev.log or debugPrintStack based on useDevLog setting.
Implementation
static void printCaught(String msg, Object ex, StackTrace? stackTrace) {
if (useDevLog) {
dev.log(msg, error: ex, stackTrace: stackTrace);
} else {
debugPrintStack(
stackTrace: stackTrace, label: '$msg : ${ex.runtimeType} : $ex');
}
}