List of usage examples for java.lang NumberFormatException printStackTrace
public void printStackTrace()
From source file:in.raster.oviyam.util.core.DcmRcv.java
private static int parseInt(String s, String errPrompt, int min, int max) { try {/* www .j av a 2 s . c om*/ int i = Integer.parseInt(s); if (i >= min && i <= max) { return i; } } catch (NumberFormatException e) { e.printStackTrace(); // parameter is not a valid integer; fall through to exit } exit(errPrompt); throw new RuntimeException(); }
From source file:com.sisrni.converter.TipoDocumentoConverter.java
@Override public Object getAsObject(FacesContext facesContext, UIComponent component, String value) { value = String.valueOf(value); if (JsfUtil.isDummySelectItem(component, value)) { return null; }//from ww w . j a v a 2s .c o m if (value != null && value.trim().length() > 0 && !value.equalsIgnoreCase("null")) { try { return this.tipoDocumentoService.findById(getKey(value)); } catch (NumberFormatException e) { e.printStackTrace(); throw new ConverterException( new FacesMessage(FacesMessage.SEVERITY_ERROR, "Conversion Error", "Not a valid theme.")); } } else { return null; } }
From source file:com.sisrni.converter.SsOpcionesConverter.java
@Override public Object getAsObject(FacesContext facesContext, UIComponent component, String value) { value = String.valueOf(value); if (JsfUtil.isDummySelectItem(component, value)) { return null; }//from www . jav a 2 s . c om if (value != null && value.trim().length() > 0 && !value.equalsIgnoreCase("null")) { try { return this.ssOpcionesService.findById(getKey(value)); } catch (NumberFormatException e) { e.printStackTrace(); throw new ConverterException(new FacesMessage(FacesMessage.SEVERITY_ERROR, "ssOpcionesConverter Error", "Not a valid theme.")); } } else { return null; } }
From source file:com.sisrni.converter.RolesConverter.java
@Override public Object getAsObject(FacesContext facesContext, UIComponent component, String value) { value = String.valueOf(value); if (JsfUtil.isDummySelectItem(component, value)) { return null; }//from w w w.j av a 2 s . c o m if (value != null && value.trim().length() > 0 && !value.equalsIgnoreCase("null")) { try { return this.ssRolesService.findById(getKey(value)); } catch (NumberFormatException e) { e.printStackTrace(); throw new ConverterException( new FacesMessage(FacesMessage.SEVERITY_ERROR, "Conversion Error", "Not a valid theme.")); } } else { return null; } }
From source file:it.f2informatica.webapp.utils.PeriodParser.java
public Date resolveDateByMonthAndYear(String month, String year) { try {/* ww w .ja v a2s.c o m*/ return _resolveDateByMonthAndYear(month, year); } catch (NumberFormatException nfe) { nfe.printStackTrace(); return null; } }
From source file:com.sisrni.converter.TipoPersonaConverter.java
@Override public Object getAsObject(FacesContext facesContext, UIComponent component, String value) { value = String.valueOf(value); if (JsfUtil.isDummySelectItem(component, value)) { return null; }//from w w w . j av a2s. com if (value != null && value.trim().length() > 0 && !value.equalsIgnoreCase("null")) { try { Integer key = getKey(value); TipoPersona findById = this.tipoPersonaService.findById(key); return findById; } catch (NumberFormatException e) { e.printStackTrace(); throw new ConverterException( new FacesMessage(FacesMessage.SEVERITY_ERROR, "Conversion Error", "Not a valid theme.")); } } else { return null; } }
From source file:com.sisrni.converter.UnidadConverter.java
@Override public Object getAsObject(FacesContext facesContext, UIComponent component, String value) { value = String.valueOf(value); if (JsfUtil.isDummySelectItem(component, value)) { return null; }//from w w w .j a va 2s .c o m if (value != null && value.trim().length() > 0 && !value.equalsIgnoreCase("null")) { try { Integer key = getKey(value); Unidad findById = this.unidadService.findById(key); return findById; } catch (NumberFormatException e) { e.printStackTrace(); throw new ConverterException( new FacesMessage(FacesMessage.SEVERITY_ERROR, "Conversion Error", "Not a valid theme.")); } } else { return null; } }
From source file:com.sisrni.converter.PersonaConverter.java
@Override public Object getAsObject(FacesContext facesContext, UIComponent component, String value) { value = String.valueOf(value); if (JsfUtil.isDummySelectItem(component, value)) { return null; }/*from w ww . j a v a2s . c om*/ if (value != null && value.trim().length() > 0 && !value.equalsIgnoreCase("null")) { try { Integer key = getKey(value); Persona findById = this.personaService.getByID(key); return findById; } catch (NumberFormatException e) { e.printStackTrace(); throw new ConverterException( new FacesMessage(FacesMessage.SEVERITY_ERROR, "Conversion Error", "Not a valid theme.")); } } else { return null; } }
From source file:com.sisrni.converter.EstadoConverter.java
@Override public Object getAsObject(FacesContext facesContext, UIComponent component, String value) { value = String.valueOf(value); if (JsfUtil.isDummySelectItem(component, value)) { return null; }/*from w w w.java 2s.c o m*/ if (value != null && value.trim().length() > 0 && !value.equalsIgnoreCase("null")) { try { return this.estadoService.findById(getKey(value)); } catch (NumberFormatException e) { e.printStackTrace(); throw new ConverterException( new FacesMessage(FacesMessage.SEVERITY_ERROR, "Conversion Error", "Not a valid theme.")); } } else { return null; } }
From source file:org.wikipedia.vlsergey.secretary.jwpf.actions.PostPostLogin.java
@Override protected void parseAPI(org.w3c.dom.Element root) throws ProcessException, ParseException { Element login = (Element) root.getElementsByTagName("login").item(0); String result = login.getAttribute("result"); if (result.equalsIgnoreCase(success)) { try {//from w w w. j a va2s.co m this.login = new LoginData(Integer.parseInt(login.getAttribute("lguserid")), login.getAttribute("lgusername"), login.getAttribute("lgtoken")); } catch (NumberFormatException e) { e.printStackTrace(); } } else if (result.equalsIgnoreCase(wrongPass)) { exceptionText = "Wrong Password"; } else if (result.equalsIgnoreCase(notExists)) { exceptionText = "No sutch User"; } }