public MechFileParser(InputStream is, String fileName) throws EntityLoadingException { try { parse(is, fileName); } catch (Exception ex) { ex.printStackTrace(); if (ex instanceof EntityLoadingException) { throw new EntityLoadingException(ex.getMessage()); } throw new EntityLoadingException("Exception from " + ex.getClass() + ": " + ex.getMessage()); } }