List of usage examples for java.lang Exception fillInStackTrace
public synchronized Throwable fillInStackTrace()
From source file:org.alfresco.repo.search.impl.noindex.NoIndexSearchService.java
private void trace() { if (s_logger.isTraceEnabled()) { Exception e = new Exception(); e.fillInStackTrace(); StringBuilder sb = new StringBuilder(1024); StackTraceUtil.buildStackTrace("Search trace ...", e.getStackTrace(), sb, -1); s_logger.trace(sb);/* w ww .j av a 2 s .com*/ } }
From source file:net.kamhon.ieagle.function.user.service.UserDetailsServiceTest.java
@Test @Ignore/*from ww w .j a v a 2 s . co m*/ public void testOnSaveAdminUser() { if (!userDetailsService.isUsernameAvailable(null, "admin")) { log.debug("the user admin already exists"); return; } User user = new User(true); user.setUserId(AppDetailsBaseAdvice.SYSTEM_USER_ID); user.setStaffCode("staffcode"); user.setCompId(FrameworkConst.DEFAULT_COMPANY); user.setUsername("admin"); // user.setDeptId(1L); user.setRootLocId(1L); user.setLocId(1L); user.setFullname("Admin"); user.setPassword("123456"); try { userDetailsService.saveUser(user, null); } catch (Exception ex) { log.debug(ex, ex.fillInStackTrace()); } }
From source file:net.kamhon.ieagle.aop.ExceptionLoggingAroundAdvice.java
public Object invoke(MethodInvocation arg0) throws Throwable { try {/*from w w w . jav a 2 s. c om*/ return arg0.proceed(); } catch (Exception ex) { if (exceptionLoggingBundle.isNeedToLog(ex)) { log.error(ex, ex.fillInStackTrace()); } throw ex; } }
From source file:uk.nhs.cfh.dsp.srth.desktop.modules.scripting.impl.GroovyConsoleServiceImpl.java
public void launch() { thread = new Thread() { @Override/*from w w w .ja v a 2 s . c om*/ public void run() { try { if (console == null) { console = new Console(createBinding()); } // set autoclear property console.setAutoClearOutput(isAutoClearOutput()); console.run(); } catch (Exception e) { logger.warn("Nested exception is : " + e.fillInStackTrace()); } } }; thread.setDaemon(true); thread.start(); }
From source file:net.kamhon.ieagle.util.MessageFactory.java
private void processIsAlwaysReload() { if (isAlwaysReload()) { // remove all object MESSAGE_RESOURCES.clear();//from w w w . ja v a 2s . c o m Class<?> type = ResourceBundle.class; try { Field cacheList = type.getDeclaredField("cacheList"); cacheList.setAccessible(true); Map<?, ?> cache = (Map<?, ?>) cacheList.get(ResourceBundle.class); cache.clear(); log.debug("cache.size() = " + cache.size()); } catch (Exception ex) { log.fatal(ex, ex.fillInStackTrace()); } } }
From source file:com.hp.test.framework.jelly.PopupVerifyTextTag.java
@Override public void doTag(XMLOutput arg0) throws MissingAttributeException, JellyTagException { WebDriver driver = getSelenium();//from www. j av a 2 s . c o m logger.info("Started Execution of PopupVerifyTextTag"); try { Alert alert = driver.switchTo().alert(); actual = alert.getText(); if (actual.contains(expected)) { System.out.println(expected + " text is on this popup"); ATUReports.setAuthorInfo("Core Automation Team", "DATE()", "1.0"); ATUReports.add("Verification of popup text", expected, actual, false); } else { System.out.println(expected + " text is NOT on this popup"); ATUReports.setAuthorInfo("Core Automation Team", "DATE()", "1.0"); ATUReports.add("Verification of popup text", expected, actual, false); //try { org.testng.Assert.fail("Verification of popup text" + actual + "Expected" + expected); } } catch (Exception e) { logger.error("Exception occurred while getting text from alert" + "\n" + e.fillInStackTrace()); } logger.info("Completed Execution of PopupVerifyTextTag"); }
From source file:net.kamhon.ieagle.aop.DwrDelegateAdvice.java
public Object invoke(ProceedingJoinPoint pjp) throws Throwable { log.debug(pjp.toLongString());//www . java 2 s. c o m Object retVal = null; try { retVal = pjp.proceed(); } catch (Exception ex) { if (!(ex instanceof ValidatorException)) { log.error(ex, ex.fillInStackTrace()); } throw ex; } return retVal; }
From source file:uk.nhs.cfh.dsp.srth.desktop.modules.scripting.impl.AbstractGroovyService.java
public void launchInBackground() { logger.info("Launching GroovyService in background"); serverThread = new Thread() { @Override//from ww w . j a v a 2 s . c o m public void run() { try { launch(); } catch (Exception e) { logger.warn("Nested exception is : " + e.fillInStackTrace()); } } }; serverThread.setDaemon(true); serverThread.start(); }
From source file:com.datasalt.pangool.solr.HeartBeater.java
/** * inform the background thread that this heartbeat request is not needed. This must be called at some point after * each {@link #needHeartBeat()} request. *//*from w ww. j av a 2 s . co m*/ public synchronized void cancelHeartBeat() { if (threadsNeedingHeartBeat > 0) { threadsNeedingHeartBeat--; } else { Exception e = new Exception("Dummy"); e.fillInStackTrace(); LOG.warn("extra call to cancelHeartBeat", e); } }
From source file:org.tdmx.lib.control.job.TestJobExecutorImpl.java
@Override public void execute(Long id, TestTask task) { if (StringUtils.hasText(task.getExceptionMessage())) { log.info("FAILURE task " + id + " with " + task.getProcessTimeMs() + "ms delay - " + task.getExceptionMessage()); } else {// www.j a va 2s.c om log.info("SUCCESS task " + id + " with " + task.getProcessTimeMs() + "ms delay"); } if (task.getProcessTimeMs() > 0) { try { Thread.sleep(task.getProcessTimeMs()); } catch (InterruptedException e) { // ignore ie. } } task.setProcessMessage("" + id); if (StringUtils.hasText(task.getExceptionMessage())) { // usually the problem comes from deeper in the service layer. Exception causingException = new Exception(task.getExceptionMessage()); causingException.fillInStackTrace(); throw new RuntimeException("Some Problem Occured.", causingException); } }