List of usage examples for java.text ParseException setStackTrace
public void setStackTrace(StackTraceElement[] stackTrace)
From source file:org.kalypso.wspwin.core.WspWinProfProj.java
/** * Reads the file profproj.txt/*from w ww . j a v a 2 s .co m*/ */ public void read(final File wspwinDir) throws IOException, ParseException { final WspWinProject wspWinProject = new WspWinProject(wspwinDir); final File profprojFile = wspWinProject.getProfProjFile(); try (LineNumberReader reader = new LineNumberReader(new FileReader(profprojFile));) { final int[] counts = readStrHeader(reader); final int profilCount = counts[0]; final int relationCount = counts[1]; if (relationCount == 0) { // ignore for now; later we may do sanity checks, if there are unused profiles } final ProfileBean[] profiles = ProfileBean.readProfiles(reader, profilCount); m_profiles.addAll(Arrays.asList(profiles)); } catch (final ParseException pe) { final String msg = Messages.getString("org.kalypso.wspwin.core.WspCfg.6") //$NON-NLS-1$ + profprojFile.getAbsolutePath() + " \n" + pe.getLocalizedMessage(); //$NON-NLS-1$ final ParseException newPe = new ParseException(msg, pe.getErrorOffset()); newPe.setStackTrace(pe.getStackTrace()); throw newPe; } }