Logs an exception and shows it to the user.
164319
private void processUncaughtException(Thread thread, Throwable throwable) {
        if (exceptionPurger != null) {
            throwable = exceptionPurger.purge(throwable);
        }
        logException(thread, throwable);
        notifyUserAboutException(thread, throwable);
    }
279829
def _show_traceback(method):
    """"""
    def m(self, *args, **kwargs):
        try:
            return(method(self, *args, **kwargs))
        except Exception as e:
            ip = get_ipython()
            if ip is None:
                self.log.warning("Exception in widget method %s: %s", method, e, exc_info=True)
            else:
                ip.showtraceback()
    return m
1227675
def _generate_throw_error(self, name, reason):
        """"""
        throw_exc = '@throw([NSException exceptionWithName:@"{}" reason:{} userInfo:nil]);'
        self.emit(throw_exc.format(name, reason))
1275270
def _log_exception(self, exception):
        
        self._io.error(str(exception).strip().split(os.linesep))
862240
public static function exception_log($exception){
		LogMaster::log("!!!Uncaught Exception\nCode: " . $exception->getCode() . "\nMessage: " . $exception->getMessage());
		if (LogMaster::$_output){
			echo "<pre><xmp>\n";
			echo LogMaster::get_session_log();
			echo "\n</xmp></pre>";
		}
		die();
	}
1290284
public void logException(Level level) {
        if (!LOG.isLoggable(level)) {
            return;
        }
        final StringBuilder builder = new StringBuilder();
        builder.append("\n----------------------------------------------------");
        builder.append("\nMonitoringException");
        builder.append("\n----------------------------------------------------");
        builder.append("\nCode:    ").append(code);
        builder.append("\nMessage: ").append(message);
        builder.append("\n----------------------------------------------------");
        if (events != null) {
            for (Event event : events) {
                builder.append("\nEvent:");
                if (event.getMessageInfo() != null) {
                    builder.append("\nMessage id: ").append(event.getMessageInfo().getMessageId());
                    builder.append("\nFlow id:    ").append(event.getMessageInfo().getFlowId());
                    builder.append("\n----------------------------------------------------");
                } else {
                    builder.append("\nNo message id and no flow id");
                }
            }
        }
        builder.append("\n----------------------------------------------------\n");
        LOG.log(level, builder.toString(), this);
    }
1042471
def log_exception(self, exc_info):
        """"""
        dsn = self.config.get("SENTRY_DSN")
        if not dsn:
            super().log_exception(exc_info)
606060
function ExceptionReporter(logger, level) {
    this.logger = logger;
    this.level = level || new Level('UNCAUGHT EXCEPTION', Infinity);
    this.exceptionHandler = this.onUncaughtException.bind(this);
}
694033
def _log_and_raise_exception(msg, data, cls=FoursquareException):
  """"""
  data = u'{0}'.format(data)
  # We put data as a argument for log.error() so error tracking systems such
  # as Sentry will properly group errors together by msg only
  log.error(u'{0}: %s'.format(msg), data)
  raise cls(u'{0}: {1}'.format(msg, data))
640872
def _handle_exception():
    """"""
    # Heavily influenced by logging.Handler.handleError.

    # See note here:
    # https://docs.python.org/3.4/library/sys.html#sys.__stderr__
    if sys.stderr:
        einfo = sys.exc_info()
        try:
            traceback.print_exception(einfo[0], einfo[1], einfo[2],
                                      None, sys.stderr)
        except IOError:
            pass
        finally:
            del einfo
942429
def exception_logger(error)
      Rails.logger.error("\n#{error.class} #{error.message} in #{error.backtrace.first}")
      Rails.logger.error(error.backtrace[1..50].each { |line|
        line.gsub(/#{Rails.root.to_s}/, '')
      }.join("\n"))
    end
494615
def show_error(self, *messages):
        """"""
        if not self.quiet:
            self.display(messages, main_sig, debug=True)
522567
def logged_exception(self, e):
        
        if str(e) not in self._errors:
            self._errors.append(str(e))

        self.set_error_state()
        self.buildstate.state.exception_type = str(e.__class__.__name__)
        self.buildstate.state.exception = str(e)
64008
def error_log(self, msg='', level=20, traceback=False):
        
        # Override this in subclasses as desired
        sys.stderr.write(msg + '\n')
        sys.stderr.flush()
        if traceback:
            tblines = traceback_.format_exc()
            sys.stderr.write(tblines)
            sys.stderr.flush()
891965
public static void log(final Level level, final Throwable exception) {
		String nameOfException = exception.getClass().getName();
		String messageOfException = exception.getMessage();

		if (messageOfException == null || messageOfException.isEmpty()) {
			System.err.println("LOGGER " + level + ": " + nameOfException);
		} else {
			System.err.println("LOGGER " + level + ": " + messageOfException + " (" + nameOfException + ")");
		}
	}
959828
function logexception(\Exception $exception) {
		try {
			$message = $exception->getMessage();
			$trace = $exception->getTraceAsString();
			$trace = $this->becloud($trace);
			$trace = str_replace("\n", "\n\t", trim($trace, " \n\r\t"));
			$this->log("$message\n\n\t$trace\n");
		}
		catch (\Exception $e) {
			$this->failedLogging($e, $exception->getMessage());
		}
	}
768881
public static void showFatalError(String title, String header, Exception e) {
        showException(title, header, e);
        System.exit(0);
    }