logCatch<T> function
- NUILogExceptionHandler<
T> task
Implementation
T logCatch<T>(NUILogExceptionHandler<T> task){
if(NUILog.instance == null){
try{
return task();
}catch(e, s){
logNUI("NUILog", "Exception found with error: $e, stacktrace: $s");
}
return null;
}
else{
try{
return task();
}catch(e, s){
logNUI("NUILog", "Exception logged with error: $e, stacktrace: $s");
NUILog.instance.saveLogFromStackTrace(stackTrace: s, error: e);
}
return null;
}
}