function reportException(e: ExtendedError, isFatal: bool) {
  const {ExceptionsManager} = require('NativeModules');
  if (ExceptionsManager) {
    const parseErrorStack = require('parseErrorStack');
    const stack = parseErrorStack(e);
    const currentExceptionID = ++exceptionID;
    if (isFatal) {
      ExceptionsManager.reportFatalException(e.message, stack, currentExceptionID);
    } else {
      ExceptionsManager.reportSoftException(e.message, stack, currentExceptionID);
    }
    if (__DEV__) {
      const symbolicateStackTrace = require('symbolicateStackTrace');
      symbolicateStackTrace(stack).then(
        (prettyStack) => {
          if (prettyStack) {
            const stackWithoutInternalCallsites = prettyStack.filter(
              frame => frame.file.match(INTERNAL_CALLSITES_REGEX) === null,
            );
            ExceptionsManager.updateExceptionMessage(
              e.message,
              stackWithoutInternalCallsites,
              currentExceptionID,
            );
          } else {
            throw new Error('The stack is null');
          }
        }
      ).catch(
        (error) => console.warn('Unable to symbolicate stack trace: ' + error.message)
      );
    }
  }
}
Handles the developer-visible aspect of errors and exceptions