public void throwing(final String sourceClass, final String sourceMethod, final Throwable thrown) { logger.throwing(sourceClass, sourceMethod, thrown); }
public void throwing(final String sourceClass, final String sourceMethod, final Throwable thrown) { logger.throwing(sourceClass, sourceMethod, thrown); }
/** * 快速保存 * * @param path * @param content * @return */ public static boolean saveTxt(String path, String content) { try { FileChannel fc = new FileOutputStream(path).getChannel(); fc.write(ByteBuffer.wrap(content.getBytes())); fc.close(); } catch (Exception e) { logger.throwing("IOUtil", "saveTxt", e); logger.warning("IOUtil saveTxt 到" + path + "失败" + e.toString()); return false; } return true; }
@Override protected T initialValue(){ try { T obj = type.newInstance(); if (path != null) { ((AssetLocator)obj).setRootPath(path); } return obj; } catch (InstantiationException ex) { logger.log(Level.SEVERE,"Cannot create locator of type {0}, does" + " the class have an empty and publically accessible"+ " constructor?", type.getName()); logger.throwing(type.getName(), "<init>", ex); } catch (IllegalAccessException ex) { logger.log(Level.SEVERE,"Cannot create locator of type {0}, " + "does the class have an empty and publically " + "accessible constructor?", type.getName()); logger.throwing(type.getName(), "<init>", ex); } return null; } }
/** * Convenience method that calls {@link #getMetaPropertyValues(java.lang.Object)}(self) * and provides the data in form of simple key/value pairs, i.e. without * type() information. * * @param self the receiver object * @return meta properties as Map of key/value pairs * @since 1.0 */ public static Map getProperties(Object self) { List<PropertyValue> metaProps = getMetaPropertyValues(self); Map<String, Object> props = new LinkedHashMap<String, Object>(metaProps.size()); for (PropertyValue mp : metaProps) { try { props.put(mp.getName(), mp.getValue()); } catch (Exception e) { LOG.throwing(self.getClass().getName(), "getProperty(" + mp.getName() + ")", e); } } return props; }
AppSchemaDataAccessConfigurator.LOGGER.throwing( getClass().getName(), "resolveRelativePaths", e); throw new RuntimeException(e);
public void throwing(String srcClass, String srcMeth, Throwable t) { if (! logger.isLoggable( Level.FINER )) return; logger.throwing( srcClass, srcMeth, t ); }
public void throwing(String srcClass, String srcMeth, Throwable t) { if (! logger.isLoggable( Level.FINER )) return; logger.throwing( srcClass, srcMeth, t ); }
public void throwing(String srcClass, String srcMeth, Throwable t) { if (! logger.isLoggable( Level.FINER )) return; logger.throwing( srcClass, srcMeth, t ); }
private static String getPath(File file) { try { return file.getCanonicalPath(); } catch (IOException ex) { LOG.throwing(FileToRepoMappingStorage.class.getCanonicalName(), "storeMappingToPrefs", //NOI18N ex); return null; } }
@Override public void info(Object arg0, Throwable arg1) { _log.throwing(null, null, arg1); _log.info(arg0.toString()); }
@Override public void fatal(Object arg0, Throwable arg1) { _log.throwing(null, null, arg1); _log.severe(arg0.toString()); }
private void putPoison() { boolean success = false; while (!success) { try { requests.put(POISON); success = true; } catch (InterruptedException e) { LOG.throwing(this.getClass().getName(), "stop", e); } } }
@Override public void run() { try (PrintWriter writer = new PrintWriter(writerProvider.getWriter())) { writer.println(objectMapper.writeValueAsString(object)); writer.flush(); } catch (IOException e) { LOG.throwing(LogJob.class.getName(), "run", e); } } }
/** * PUBLIC: * <p> * Log a throwable. * </p><p> * @param throwable a throwable * </p> */ @Override public void throwing(Throwable throwable) { getLogger(null).throwing(null, null, throwable); }
/** * {@inheritDoc} */ public void throwing(String s, String s1, Throwable throwable) { getWrapped().throwing(s, s1, throwable); }
public void bind() { LOG.fine("bind calling, creating and opening ServiceTracker..."); Filter filter = null; try { filter = context.createFilter(FILTER); } catch (InvalidSyntaxException e) { LOG.throwing(this.getClass().getName(), "bind", e); } tracker = new ServiceTracker(context, filter, new Customizer()); tracker.open(); }
public void enrich(Object testCase) { if (SecurityActions.isClassPresent(ANNOTATION_NAME)) { try { if (createContext() != null) { injectClass(testCase); } } catch (Exception e) { log.throwing(EJBInjectionEnricher.class.getName(), "enrich", e); } } }
public Object deserializeData(NetworkDataRepresentation ndr,List defferedPointers, Map additionalData, int FLAG) { UUID ret = new UUID(); try { ret.decode(ndr,ndr.getBuffer()); } catch (NdrException e) { JISystem.getLogger().throwing("UUIDImpl","deserializeData",e); ret = null; } return ret; }
private void invoke(VoidThrowingInvocation invocation) throws MatlabInvocationException { LOGGER.entering(CLASS_NAME, invocation.name, invocation.args); try { invocation.invoke(); LOGGER.exiting(CLASS_NAME, invocation.name); } catch (MatlabInvocationException e) { LOGGER.throwing(CLASS_NAME, invocation.name, e); LOGGER.exiting(CLASS_NAME, invocation.name); throw e; } }