RemoteExceptionCause(final String msg, final RemoteExceptionCause cause, final String exceptionClassName, final Map<String, String> fields, boolean cloneFields) { super(msg); if (cause != null) { initCause(cause);
private static RemoteExceptionCause of(Throwable t, IdentityHashMap<Throwable, RemoteExceptionCause> seen) { if (t == null) return null; if (t instanceof RemoteExceptionCause) { return (RemoteExceptionCause) t; } else { final RemoteExceptionCause existing = seen.get(t); if (existing != null) { return existing; } final RemoteExceptionCause e = new RemoteExceptionCause(t.getMessage(), t.getClass().getName(), fieldGetterValue.get(t.getClass()).apply(t)); e.setStackTrace(t.getStackTrace()); seen.put(t, e); final Throwable cause = t.getCause(); if (cause != null) e.initCause(of(cause, seen)); for (Throwable throwable : t.getSuppressed()) { e.addSuppressed(of(throwable, seen)); } return e; } }
cache.set(idx, result); RemoteExceptionCause causedBy = readObject(input, RemoteExceptionCause.class, cache, true); result.initCause(causedBy); length = readPackedInt(input); result.setStackTrace(stackTrace);
RemoteExceptionCause(final String msg, final RemoteExceptionCause cause, final String exceptionClassName, final Map<String, String> fields, boolean cloneFields) { super(msg); if (cause != null) { initCause(cause);
RemoteExceptionCause(final String msg, final RemoteExceptionCause cause, final String exceptionClassName, final Map<String, String> fields, boolean cloneFields) { super(msg); if (cause != null) { initCause(cause);
private static RemoteExceptionCause of(Throwable t, IdentityHashMap<Throwable, RemoteExceptionCause> seen) { if (t == null) return null; if (t instanceof RemoteExceptionCause) { return (RemoteExceptionCause) t; } else { final RemoteExceptionCause existing = seen.get(t); if (existing != null) { return existing; } final RemoteExceptionCause e = new RemoteExceptionCause(t.getMessage(), t.getClass().getName(), fieldGetterValue.get(t.getClass()).apply(t)); e.setStackTrace(t.getStackTrace()); seen.put(t, e); final Throwable cause = t.getCause(); if (cause != null) e.initCause(of(cause, seen)); for (Throwable throwable : t.getSuppressed()) { e.addSuppressed(of(throwable, seen)); } return e; } }
private static RemoteExceptionCause of(Throwable t, IdentityHashMap<Throwable, RemoteExceptionCause> seen) { if (t == null) return null; if (t instanceof RemoteExceptionCause) { return (RemoteExceptionCause) t; } else { final RemoteExceptionCause existing = seen.get(t); if (existing != null) { return existing; } final RemoteExceptionCause e = new RemoteExceptionCause(t.getMessage(), t.getClass().getName(), fieldGetterValue.get(t.getClass()).apply(t)); e.setStackTrace(t.getStackTrace()); seen.put(t, e); final Throwable cause = t.getCause(); if (cause != null) e.initCause(of(cause, seen)); for (Throwable throwable : t.getSuppressed()) { e.addSuppressed(of(throwable, seen)); } return e; } }
cache.set(idx, result); RemoteExceptionCause causedBy = readObject(input, RemoteExceptionCause.class, cache, true); result.initCause(causedBy); length = readPackedInt(input); result.setStackTrace(stackTrace);
cache.set(idx, result); RemoteExceptionCause causedBy = readObject(input, RemoteExceptionCause.class, cache, true); result.initCause(causedBy); length = readPackedInt(input); result.setStackTrace(stackTrace);