Here are the examples of the java api com.vaadin.server.SystemMessages.getInternalErrorURL() taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.
1 Examples
4
Source : SockJSPushHandler.java
with MIT License
from mcollovati
with MIT License
from mcollovati
private void callWithUi(final PushEvent event, final PushEventCallback callback) {
PushSocket socket = event.socket;
RoutingContext routingContext = event.routingContext;
VertxVaadinRequest vaadinRequest = new VertxVaadinRequest(service, routingContext);
VaadinSession session = null;
service.requestStart(vaadinRequest, null);
try {
try {
session = service.findVaadinSession(vaadinRequest);
replacedert VaadinSession.getCurrent() == session;
} catch (ServiceException e) {
logger.error("Could not get session. This should never happen", e);
return;
} catch (SessionExpiredException e) {
SystemMessages msg = service.getSystemMessages(ServletPortletHelper.findLocale(null, null, vaadinRequest), vaadinRequest);
sendNotificationAndDisconnect(socket, VaadinService.createCriticalNotificationJSON(msg.getSessionExpiredCaption(), msg.getSessionExpiredMessage(), null, msg.getSessionExpiredURL()));
return;
}
UI ui = null;
session.lock();
try {
ui = service.findUI(vaadinRequest);
replacedert UI.getCurrent() == ui;
if (ui == null) {
sendNotificationAndDisconnect(socket, ExposeVaadinCommunicationPkg.getUINotFoundErrorJSON(service, vaadinRequest));
} else {
callback.run(event, ui);
}
} catch (final IOException e) {
callErrorHandler(session, e);
} catch (final Exception e) {
SystemMessages msg = service.getSystemMessages(ServletPortletHelper.findLocale(null, null, vaadinRequest), vaadinRequest);
/* TODO: verify */
PushSocket errorSocket = getOpenedPushConnection(socket, ui);
sendNotificationAndDisconnect(errorSocket, VaadinService.createCriticalNotificationJSON(msg.getInternalErrorCaption(), msg.getInternalErrorMessage(), null, msg.getInternalErrorURL()));
callErrorHandler(session, e);
} finally {
try {
session.unlock();
} catch (Exception e) {
logger.warn("Error while unlocking session", e);
// can't call ErrorHandler, we (hopefully) don't have a lock
}
}
} finally {
try {
service.requestEnd(vaadinRequest, null, session);
} catch (Exception e) {
logger.warn("Error while ending request", e);
// can't call ErrorHandler, we don't have a lock
}
}
}