public void building() { if (state != null && !isReRun()) { LOG.warn("Expected stage [{}] to have no state, but was {}", identifier, state, new Exception().fillInStackTrace()); } state = StageState.Building; }
Throwable e = new Exception().fillInStackTrace(); LOGGER.log(Level.WARNING,msg,e);
Exception e = exceptions.get(dataSource); if (e != null) { e.fillInStackTrace(); if (e instanceof IOException) { throw (IOException)e;
private void logIfJobIsCompleted(JobInstance jobInstance) { JobState currentState = getCurrentState(jobInstance.getId()); if (currentState.isCompleted() && !jobInstance.isCopy()) { String message = String.format( "State change for a completed Job is not allowed. Job %s is currently State=%s, Result=%s", jobInstance.getIdentifier(), jobInstance.getState(), jobInstance.getResult()); LOG.warn(message, new Exception().fillInStackTrace()); } }
if (LOGGER.isLoggable(Level.FINE)) { Exception e = new Exception("Full stack trace for the session creation path"); e.fillInStackTrace(); LOGGER.log( Level.FINE, if (LOGGER.isLoggable(Level.INFO)) { Exception e = new Exception("Full stack trace for the session creation path"); e.fillInStackTrace(); LOGGER.log( Level.INFO,
final DiscoveryGroupConfiguration discoveryGroupConfiguration, final TransportConfiguration[] transportConfigs) { traceException.fillInStackTrace();
public static void test() { String[] className = Thread.currentThread().getStackTrace()[1].getClassName().split("\\."); String topologyName = className[className.length - 1]; try { TopologyBuilder builder = new TopologyBuilder(); builder.setSpout("integer", new RandomIntegerSpout(), 1); builder.setBolt("slidingsum", new SlidingWindowSumBolt().withWindow(new Count(30), new Count(10)), 1) .shuffleGrouping("integer"); builder.setBolt("tumblingavg", new TumblingWindowAvgBolt().withTumblingWindow(new Count(3)), 1) .shuffleGrouping("slidingsum"); builder.setBolt("printer", new PrinterBolt(), 1).shuffleGrouping("tumblingavg"); conf.setDebug(true); JStormHelper.runTopology(builder.createTopology(), topologyName, conf, 60, new JStormHelper.CheckAckedFail(conf), isLocal); } catch (Exception e) { // TODO Auto-generated catch block e.fillInStackTrace(); Assert.fail("Failed to submit topology"); } }
public NetCDFImageReader(ImageReaderSpi originatingProvider) { super(originatingProvider); if (NetCDFUtilities.TRACE_ENABLED) { tracer = new Exception(); tracer.fillInStackTrace(); } }
/** * Creates a stack trace representing the existing thread's current state. * @return a string object representing the current state. * TODO investigate if we simply should store {@link java.lang.Thread#getStackTrace()} elements */ protected static String getThreadDump() { Exception x = new Exception(); x.fillInStackTrace(); return getStackTrace(x); }
pMarker1.addParents(gfMarker); final Exception sourceHelper = new Exception(); sourceHelper.fillInStackTrace(); final Exception cause = new NullPointerException("testNPEx"); sourceHelper.fillInStackTrace(); final StackTraceElement source = sourceHelper.getStackTrace()[0]; final IOException ioException = new IOException("testIOEx", cause);
public ShapefileDataStore(URL url) { shpFiles = new ShpFiles(url); if (TRACE_ENABLED) { trace = new Exception(); trace.fillInStackTrace(); } shpManager = new ShapefileSetManager(shpFiles, this); indexManager = new IndexManager(shpFiles, this); }
ex.fillInStackTrace(); logger.debug("Health Service CREATED", ex);
public Object handle(MethodCall methodCall, Skeleton parent) throws Exception { thingToThrow.fillInStackTrace(); throw thingToThrow; } });
@Override public final Throwable fillInStackTrace() { if (shouldFillInStackTrace()) { return super.fillInStackTrace(); } return null; } }
/** * Creates a stack trace representing the existing thread's current state. * @return a string object representing the current state. * TODO investigate if we simply should store {@link java.lang.Thread#getStackTrace()} elements */ protected static String getThreadDump() { Exception x = new Exception(); x.fillInStackTrace(); return getStackTrace(x); }
public void run() { try { startSignal.await(); checkBook(address, id, expected); doneSignal.countDown(); } catch (InterruptedException ex) { // ignore } catch (Exception ex) { ex.fillInStackTrace(); error = ex; } }
public String sayHi() { // throw the exception out with some cause Exception cause = new IllegalArgumentException("Get a wrong name <sayHi>", new NullPointerException("Test cause.")); cause.fillInStackTrace(); throw new Fault("sayHiFault", LOG, cause); }
@Test public void numStackTraces() { Counter c = registry.counter("log4j.numStackTraces", "loglevel", "5_DEBUG", "exception", "IllegalArgumentException", "file", "?"); // Location is unknown because it is not called via logger Assertions.assertEquals(0, c.count()); Exception e = new IllegalArgumentException("foo"); e.fillInStackTrace(); appender.append(newEvent(Level.DEBUG, e)); Assertions.assertEquals(1, c.count()); }