Notifies the extensions that the session changed, if the given exception is {@code null}.

@param exception the exception that happened when changing the session, or {@code null} if none.
325967
private void notifyExtensionsSessionChanged(Exception exception) {
		if (exception == null) {
			getExtensionLoader().databaseOpen(model.getDb());
			getExtensionLoader().sessionChangedAllPlugin(model.getSession());
		}
	}
746665
public void addException(Exception e) {
        if (exceptions == null) {
            exceptions = new ArrayList<>();
        }
        exceptions.add(e);
        log.error(e.getMessage(), e);
    }
436914
@Override
    public void notifyException(Throwable exception)
    {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(tc, "notifyException", new Object[] { this, exception });

        // If an asynch consumer is registered we need to let them know something went wrong
        if (_asynchConsumerRegistered)
            _asynchConsumer.notifyExceptionListeners(exception, _consumerSession);

        this.lock();
        try
        {
            if (_waiting)
            {
                // We need to get the exception back to the synchronous consumer
                _notifiedException = exception;
                _waiter.signal();
            }
        } finally
        {
            this.unlock();
        }

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(tc, "notifyException");
    }
844169
@SuppressWarnings("checkstyle:regexp")
	public static void showError(String message, Throwable exception) {
		try (PrintWriter logger = new PrintWriter(getConsoleLogger())) {
			if (message != null && !message.isEmpty()) {
				logger.println(message);
			} else if (exception != null) {
				exception.printStackTrace(logger);
			}
			logger.println();
			logger.flush();
			showHelp(logger, false);
			showVersion(true);
		}
	}
1154424
public void setConfigException(Exception e)
  {
    log.log(Level.FINER, e.toString(), e);
  }
94509
private static String getExceptionMessage(final String[] exception) {
        StringBuffer buff = new StringBuffer();
        for (int i = 0; i < exception.length; i++) {
            buff.append(exception[i]);
        }
        return buff.toString();
    }
1303070
@Override
    public void exceptionCaught(IoSession session, Throwable cause) {
        final IoSessionInputStream in = (IoSessionInputStream) session
                .getAttribute(KEY_IN);

        IOException e = null;
        if (cause instanceof StreamIoException) {
            e = (IOException) cause.getCause();
        } else if (cause instanceof IOException) {
            e = (IOException) cause;
        }

        if (e != null && in != null) {
            in.throwException(e);
        } else {
            LOGGER.warn("Unexpected exception.", cause);
            session.close(true);
        }
    }
120291
@Override
	public final void exceptionCaught(final IoSession session, final Throwable cause)
			throws Exception {
		LaunchingMessageKind.EREMOTE0009.format(cause);
	}
1269880
public void onExceptionWithServer(ExecutionContext<I> context, Throwable exception, ExecutionInfo info) {
        for (ExecutionListener<I, O> listener: listeners) {
            try {
                if (!isListenerDisabled(listener)) {
                    listener.onExceptionWithServer(context.getChildContext(listener), exception, info);
                }
            } catch (Throwable e) {
                logger.error("Error invoking listener " + listener, e);
            }
        }
    }
686343
@Override
    public void messageSent(IoSession session, Object message) throws Exception {
        MessageHandler<Object> handler = findSentMessageHandler(message.getClass());
        if (handler != null) {
            handler.handleMessage(session, message);
        } else {
            throw new UnknownMessageTypeException(
                    "No handler found for message type: " +
                    message.getClass().getSimpleName());
        }
    }
1288376
public void sessionOpened(IoSession session) throws Exception {
        SingleSessionIoHandler handler = (SingleSessionIoHandler) session
                .getAttribute(HANDLER);
        handler.sessionOpened();
    }
225104
private static <T> T nullForNotFound(IOException exception) {
    ComputeException serviceException = translate(exception);
    if (serviceException.getCode() == HTTP_NOT_FOUND) {
      return null;
    }
    throw serviceException;
  }
595493
@Override
    public void doExceptionCaughtListeners(final long sessionId, final Throwable cause) {
        runManagementTask(new Runnable() {
            @Override
            public void run() {
                try {
                    // The particular management listeners change on strategy, so get them here.
                    for (final GatewayManagementListener listener : getManagementListeners()) {
                        listener.doExceptionCaught(GatewayManagementBeanImpl.this, sessionId);
                    }

                    markChanged();  // mark ourselves as changed, possibly tell listeners
                } catch (Exception ex) {
                    logger.warn("Error during exceptionCaught gateway listener notifications:", ex);
                }
            }
        });
    }
1270749
public final void exceptionOccured( JMSException exception )
    {
        try
        {
        	synchronized (exceptionListenerLock)
        	{
        		if (exceptionListener != null)
        			exceptionListener.onException(exception);
        	}
        }
        catch (Exception e)
        {
            log.error("Exception listener failed",e);
        }
    }
479263
private void exception(Throwable e)
    {
        try
        {
            _persistent=false;
            int error_code=HttpResponse.__500_Internal_Server_Error;
            
            if (e instanceof HttpException)
            {
                error_code=((HttpException)e).getCode();
                
                if (_request==null)
                    log.warn(e.toString());
                else
                    log.warn(_request.getRequestLine()+" "+e.toString());
                log.debug(LogSupport.EXCEPTION,e);
            }
            else if (e instanceof EOFException)
            {
                LogSupport.ignore(log,e);
                return;
            }
            else
            {
                _request.setAttribute("javax.servlet.error.exception_type",e.getClass());
                _request.setAttribute("javax.servlet.error.exception",e);
                
                if (_request==null)
                    log.warn(LogSupport.EXCEPTION,e);
                else
                    log.warn(_request.getRequestLine(),e);
            }
            
            if (_response != null && !_response.isCommitted())
            {
                _response.reset();
                _response.removeField(HttpFields.__TransferEncoding);
                _response.setField(HttpFields.__Connection,HttpFields.__Close);
                _response.sendError(error_code);
            }
        }
        catch(Exception ex)
        {
            LogSupport.ignore(log,ex);
        }
    }
387205
@Override
    public void sessionIdChanged(String oldId, ISession session) {
        HttpSession httpsession = (HttpSessionImpl) _adapter.adapt(session);
        HttpSessionEvent event = new HttpSessionEvent(httpsession);
        HttpSessionIdListener listener = null;

        // synchronized (_sessionListeners) {
        for (int i = 0; i < _sessionIdListeners.size(); i++) {
            listener = (HttpSessionIdListener) _sessionIdListeners.get(i);
            if (com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled() && LoggingUtil.SESSION_LOGGER_CORE.isLoggable(Level.FINE)) {
                LoggingUtil.SESSION_LOGGER_CORE.logp(Level.FINE, methodClassName, "sessionIdChanged", "Calling sessionIdChanged on listener:" + listener);
            }
            listener.sessionIdChanged(event,  oldId);
        }
    }
1035078
public void exceptionCaught(Throwable cause, IoSession s) {
        if (s == null) {
            org.apache.mina.util.ExceptionMonitor.getInstance().exceptionCaught(cause);
        } else {
            exceptionCaught0(cause, s);
        }
    }