exceptionHandler function

void exceptionHandler(
  1. dynamic e
)

Exception handler for requests sent by CLI service. @param e exception

Implementation

void exceptionHandler(dynamic e) {
  if (e is ApillonApiError) {
    ApillonLogger.e('Apillon API error:\n${e.message}');
  } else if (e is ApillonNetworkError) {
    ApillonLogger.e('Error: ${e.message}');
  } else {
    ApillonLogger.e(e);
  }
}