List of usage examples for java.lang Throwable getMessage
public String getMessage()
From source file:org.springmodules.validation.valang.ValangException.java
public ValangException(Throwable t, int line, int column) { super(t.getMessage(), t); this.line = line; this.column = column; }
From source file:com.mobius.software.mqtt.performance.controller.net.ExceptionHandler.java
@Override public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) { logger.warn(cause.getMessage() + "," + ctx.channel().localAddress(), cause); if (ctx.channel().isOpen()) ctx.channel().close();// ww w . j a v a 2 s. c o m }
From source file:com.geodan.ngr.serviceintegration.TestCSWTransformer.java
private void test() { try {/*from ww w.j a v a 2 s.c om*/ MockHttpServletRequest request = new MockHttpServletRequest(); MockHttpServletResponse response = new MockHttpServletResponse(); request.setParameter("startPosition", "1"); request.setParameter("maxRecords", "3"); //request.setParameter("ElementSetName", "full"); //request.setParameter("ElementSetName", "minimal"); //request.setParameter("searchterms-1", "niEuWe"); //request.setParameter("field-1", "AnyText"); //request.setParameter("searchterms-2", "heeeeee"); //request.setParameter("field-2", "title"); //request.setParameter("searchterms-3", "OGC:WMS"); //request.setParameter("searchterms-3", "OGC:WMS-1.1.1-http-get-capabilities"); //request.setParameter("searchterms-3", "OGC:WMS-1.1.1-http-get-capabilities"); //request.setParameter("field-3", "OnlineResourceType"); //request.setParameter("url","http://nationaalgeoregister.nl:80/geonetwork/srv/en/csw"); request.setParameter("url", "http://nationaalgeoregister.nl/geonetwork/srv/en/csw"); //request.setParameter("callback", "callbackfunction"); go(request, response); } catch (Throwable x) { System.out.println(x.getMessage()); x.printStackTrace(); } }
From source file:uk.ac.ebi.eva.pipeline.listeners.SkippedItemListener.java
@Override public void onSkipInWrite(Object item, Throwable t) { logger.error("Skipped line during WRITE: " + t.getMessage()); }
From source file:io.cloudslang.lang.compiler.parser.utils.ParserExceptionHandler.java
public String getErrorMessage(Throwable e) { String errorMessage = e.getMessage(); if (e instanceof ScannerException && (errorMessage.startsWith(MAPPING_VALUES_NOT_ALLOWED_HERE_ERROR) || errorMessage.startsWith(SCANNING_A_SIMPLE_KEY_ERROR))) { errorMessage += KEY_VALUE_PAIR_MISSING_OR_INDENTATION_PROBLEM_MSG; } else if (e instanceof ConstructorException && errorMessage.startsWith(CANNOT_CREATE_PROPERTY_ERROR)) { if (errorMessage.contains(UNABLE_TO_FIND_PROPERTY_ERROR)) { //parse for undefined property name String truncatedErrorMessage = errorMessage.substring(errorMessage.indexOf(TRUNCATION_BEGINNING), errorMessage.indexOf(TRUNCATION_END)); String undefinedProperty = truncatedErrorMessage.substring(truncatedErrorMessage.indexOf("\'") + 1, truncatedErrorMessage.lastIndexOf("\'")); errorMessage += "Property \'" + undefinedProperty + "\' is not supported by CloudSlang. Check that \'" + undefinedProperty + "\' is indented properly."; } else if (errorMessage.contains(MAP_CONSTRUCTOR_NOT_FOUND_ERROR)) { errorMessage += KEY_VALUE_PAIR_MISSING_OR_INDENTATION_PROBLEM_MSG; }/*from w ww . j av a2s . c o m*/ } return errorMessage; }
From source file:uk.ac.ebi.eva.pipeline.listeners.SkippedItemListener.java
@Override public void onSkipInProcess(Object item, Throwable t) { logger.error("Skipped line during PROCESS: " + t.getMessage()); }
From source file:org.auraframework.throwable.InvalidSessionException.java
public InvalidSessionException(Throwable cause, String newToken) { super(cause.getMessage()); this.newToken = newToken; }
From source file:fm.push.web.PortfolioController.java
@CrossOrigin @MessageExceptionHandler/*from w w w . j a v a 2s .co m*/ @SendToUser("/queue/errors") public String handleException(Throwable exception) { return exception.getMessage(); }
From source file:net.sf.jabref.JabRef.java
public static ParserResult openBibFile(String name, boolean ignoreAutosave) { // String in OpenDatabaseAction.java LOGGER.info("Opening: " + name); File file = new File(name); if (!file.exists()) { ParserResult pr = new ParserResult(null, null, null); pr.setFile(file);/* w w w . j a va 2s . c o m*/ pr.setInvalid(true); System.err.println(Localization.lang("Error") + ": " + Localization.lang("File not found")); return pr; } try { if (!ignoreAutosave) { boolean autoSaveFound = AutoSaveManager.newerAutoSaveExists(file); if (autoSaveFound) { // We have found a newer autosave. Make a note of this, so it can be // handled after startup: ParserResult postp = new ParserResult(null, null, null); postp.setPostponedAutosaveFound(true); postp.setFile(file); return postp; } } if (!FileBasedLock.waitForFileLock(file, 10)) { System.out.println(Localization.lang("Error opening file") + " '" + name + "'. " + "File is locked by another JabRef instance."); return ParserResult.FILE_LOCKED; } Charset encoding = Globals.prefs.getDefaultEncoding(); ParserResult pr = OpenDatabaseAction.loadDatabase(file, encoding); if (pr == null) { pr = new ParserResult(null, null, null); pr.setFile(file); pr.setInvalid(true); return pr; } pr.setFile(file); if (pr.hasWarnings()) { for (String aWarn : pr.warnings()) { LOGGER.warn(aWarn); } } return pr; } catch (Throwable ex) { ParserResult pr = new ParserResult(null, null, null); pr.setFile(file); pr.setInvalid(true); pr.setErrorMessage(ex.getMessage()); ex.printStackTrace(); return pr; } }
From source file:com.ling.spring.task.MyAsyncUncaughtExceptionHandler.java
@Override public void handleUncaughtException(Throwable arg0, Method arg1, Object... arg2) { System.out.println(arg1.getName() + ":" + arg0.getMessage()); }