List of usage examples for java.lang RuntimeException getMessage
public String getMessage()
From source file:com.steeleforge.aem.ironsites.wcm.taglib.SetModeTag.java
@Override public int doStartTag() throws JspException { try {/*from www . ja v a2 s .c o m*/ if (StringUtils.isBlank(getMode())) { return EVAL_BODY_BUFFERED; } this.wcmmode = WCMMode.fromRequest(WCMUtil.getSlingRequest(pageContext)); for (WCMMode candidate : WCMMode.values()) { if (StringUtils.equalsIgnoreCase(getMode(), candidate.toString())) { candidate.toRequest(WCMUtil.getSlingRequest(pageContext)); break; } } } catch (RuntimeException re) { LOG.debug(re.getMessage()); throw new JspException(re); } return EVAL_BODY_BUFFERED; }
From source file:de.unioninvestment.eai.portal.portlet.crud.ui.security.EncryptionFormatter.java
@Override public String convertToPresentation(String value, Class<? extends String> targetType, Locale locale) throws com.vaadin.data.util.converter.Converter.ConversionException { if (StringUtils.isNotBlank(value)) { try {// www . j a v a 2 s .com return cryptor.decrypt(value); } catch (RuntimeException e) { throw new ConversionException("Cannot decrypt: " + e.getMessage()); } } else { return null; } }
From source file:org.impalaframework.extension.mvc.annotation.collector.CustomResolverArgumentCollector.java
public Object getArgument(NativeWebRequest webRequest, ExtendedModelMap implicitModel, TypeConverter typeConverter) {//ww w . j a v a 2s .co m try { return customResolver.resolveArgument(methodParameter, webRequest); } catch (RuntimeException e) { throw e; } catch (Exception e) { throw new RuntimeException(e.getMessage(), e); } }
From source file:com.espertech.esper.core.thread.RouteUnitMultiple.java
public void run() { try {/* w w w . j av a 2 s . c om*/ epRuntime.processStatementFilterMultiple(handle, callbackList, theEvent, filterVersion); epRuntime.dispatch(); epRuntime.processThreadWorkQueue(); } catch (RuntimeException e) { log.error("Unexpected error processing multiple route execution: " + e.getMessage(), e); } }
From source file:com.jim.im.exception.ImAllRuntimeExceptionMapper.java
@Override public Response toResponse(RuntimeException e) { ApiErrorCode errorCode = ApiErrorCode.INNER_ERROR; String errorMsg = e.getMessage(); if (StringUtils.isBlank(errorMsg)) { errorMsg = IMConstant.MSG_INNER_ERROR; }/* w ww. j av a2 s.c om*/ String requestId = RequestContext.get(IMConstant.REQUEST_ID); ApiErrorCodeException errorCodeException = new ApiErrorCodeException(requestId, errorCode, errorMsg, e); logger.error(requestId, errorCodeException); return RestResult.failure(requestId, errorCode.errorCode, errorMsg); }
From source file:org.trustedanalytics.datasetpublisher.boundary.HiveController.java
@ExceptionHandler({ IllegalArgumentException.class, IllegalStateException.class }) @ResponseStatus(value = BAD_REQUEST)/*from w ww . j a va 2 s.c o m*/ public String badRequestExceptionHandler(RuntimeException e) { return e.getMessage(); }
From source file:com.espertech.esper.core.thread.TimerUnitMultiple.java
public void run() { try {//from w ww . j ava 2s.c o m EPRuntimeImpl.processStatementScheduleMultiple(handle, callbackObject, services, exprEvaluatorContext); // Let listeners know of results runtime.dispatch(); // Work off the event queue if any events accumulated in there via a route() runtime.processThreadWorkQueue(); } catch (RuntimeException e) { log.error("Unexpected error processing multiple timer execution: " + e.getMessage(), e); } }
From source file:com.nextep.designer.p2.handlers.UpdateHandler.java
@Override public Object execute(ExecutionEvent event) throws ExecutionException { final ILicenseService licenseService = P2Plugin.getService(ILicenseService.class); try {// w ww.j a v a2s .co m final IProxyService proxyService = CorePlugin.getService(IProxyService.class); if (proxyService.isProxiesEnabled()) { proxyService.getProxyData(); } } catch (RuntimeException e) { LOGGER.error("Unable to initialize proxy service : " + e.getMessage(), e); } try { licenseService.checkForUpdates(false); } catch (UnavailableLicenseServerException e) { MessageDialog.openWarning(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), P2Messages.getString("handler.update.serverUnavailableTitle"), //$NON-NLS-1$ P2Messages.getString("handler.update.serverUnavailable") //$NON-NLS-1$ + e.getMessage()); } return null; }
From source file:com.MyHistory.Service.ServiceCuenta.java
public ResponseLogin loguear(String pNombreUsuario, String pPassword) { try {/*from w w w . jav a2s . co m*/ ResponseLogin respuesta = new ResponseLogin(); FactoryManager fabrica_manager = new FactoryManager(); IManagerUsuario manager_usuario = fabrica_manager.getManagerUsuario(); Usuario usuario = manager_usuario.autenticarUsuario(pNombreUsuario, pPassword); if (usuario != null) { UsuarioView usuario_vista = new UsuarioView(usuario.getId(), usuario.getNombreUsuario(), usuario.getRol(), usuario.getEstado()); respuesta.setResultado(true); respuesta.setMensaje(IConstantMessage.MSG_LOGIN_EXITO); respuesta.setVistaUsuario(usuario_vista); return respuesta; } respuesta.setResultado(false); respuesta.setMensaje(IConstantMessage.MSG_LOGIN_ERROR); respuesta.setVistaUsuario(null); return respuesta; } catch (RuntimeException ex) { ResponseLogin respuesta = new ResponseLogin(false, ex.getMessage(), null); return respuesta; } }
From source file:br.com.livraria.bean.AutenticacaoBean.java
public String autenticar() { try {/* www. ja va 2 s . co m*/ FuncionarioDAO funcionarioDAO = new FuncionarioDAO(); funcionarioLogado = funcionarioDAO.autenticar(funcionarioLogado.getCpf(), DigestUtils.md5Hex(funcionarioLogado.getSenha())); if (funcionarioLogado == null) { FacesUtil.adicionarMsgError("CPF e/ou senha invlidos"); return null; } else { FacesUtil.adicionarMsgInfo("Funcionrio autenticado com sucesso"); return "/pages/principal.xhtml?faces-redirect=true"; } } catch (RuntimeException ex) { FacesUtil.adicionarMsgError("Erro ao tentar autenticar no sistema:" + ex.getMessage()); return null; } }