/** * Return a message to the client. This method should not include any data * that was not sent to the server by the client to avoid leaking data. * * @param msg a printf-style format string * @param args arguments for the message * @throws ReportableException this method never returns normally * @see #die(Throwable, String, Object...) */ protected final <T> T report(String msg, Object... args) throws ReportableException { throw new ReportableException(String.format(msg, args)); }
private AutoBean<ServerFailureMessage> createFailureMessage(ReportableException e) { ServerFailure failure = exceptionHandler.createServerFailure(e.getCause() == null ? e : e.getCause()); AutoBean<ServerFailureMessage> bean = FACTORY.failure(); ServerFailureMessage msg = bean.as(); msg.setExceptionType(failure.getExceptionType()); msg.setMessage(failure.getMessage()); msg.setStackTrace(failure.getStackTraceString()); msg.setFatal(failure.isFatal()); return bean; }
/** * Report an exception thrown by code that is under the control of the * end-developer. * * @param userGeneratedException an {@link InvocationTargetException} thrown * by an invocation of user-provided code * @throws ReportableException this method never returns normally */ protected final <T> T report(InvocationTargetException userGeneratedException) throws ReportableException { throw new ReportableException(userGeneratedException.getCause()); }
private AutoBean<ServerFailureMessage> createFailureMessage(ReportableException e) { ServerFailure failure = exceptionHandler.createServerFailure(e.getCause() == null ? e : e.getCause()); AutoBean<ServerFailureMessage> bean = FACTORY.failure(); ServerFailureMessage msg = bean.as(); msg.setExceptionType(failure.getExceptionType()); msg.setMessage(failure.getMessage()); msg.setStackTrace(failure.getStackTraceString()); msg.setFatal(failure.isFatal()); return bean; }
Object domain = bean.getTag(Constants.DOMAIN_OBJECT); if (domain == null && detectDeadEntities) { throw new ReportableException(new DeadEntityException( "The requested entity is not available on the server")); accumulator = new HashSet<Object>(); } else { throw new ReportableException("Unsupported collection type " + maybeEntityProxy.getClass().getName());
private AutoBean<ServerFailureMessage> createFailureMessage(ReportableException e) { ServerFailure failure = exceptionHandler.createServerFailure(e.getCause() == null ? e : e.getCause()); AutoBean<ServerFailureMessage> bean = FACTORY.failure(); ServerFailureMessage msg = bean.as(); msg.setExceptionType(failure.getExceptionType()); msg.setMessage(failure.getMessage()); msg.setStackTrace(failure.getStackTraceString()); msg.setFatal(failure.isFatal()); return bean; }
accumulator = new HashSet<Object>(); } else { throw new ReportableException("Unsupported collection type" + returnClass.getName()); throw new ReportableException("Unsupported domain type " + returnClass.getCanonicalName());
private AutoBean<ServerFailureMessage> createFailureMessage(ReportableException e) { ServerFailure failure = exceptionHandler.createServerFailure(e.getCause() == null ? e : e.getCause()); AutoBean<ServerFailureMessage> bean = FACTORY.failure(); ServerFailureMessage msg = bean.as(); msg.setExceptionType(failure.getExceptionType()); msg.setMessage(failure.getMessage()); msg.setStackTrace(failure.getStackTraceString()); msg.setFatal(failure.isFatal()); return bean; }
if (requestFactoryToken == null) { throw new ReportableException("The client payload version is out of sync with the server");
/** * Report an exception thrown by code that is under the control of the * end-developer. * * @param userGeneratedException an {@link InvocationTargetException} thrown * by an invocation of user-provided code * @throws ReportableException this method never returns normally */ protected final <T> T report(InvocationTargetException userGeneratedException) throws ReportableException { throw new ReportableException(userGeneratedException.getCause()); }
/** * Return a message to the client. This method should not include any data * that was not sent to the server by the client to avoid leaking data. * * @param msg a printf-style format string * @param args arguments for the message * @throws ReportableException this method never returns normally * @see #die(Throwable, String, Object...) */ protected final <T> T report(String msg, Object... args) throws ReportableException { throw new ReportableException(String.format(msg, args)); }
/** * Return a message to the client. This method should not include any data * that was not sent to the server by the client to avoid leaking data. * * @param msg a printf-style format string * @param args arguments for the message * @throws ReportableException this method never returns normally * @see #die(Throwable, String, Object...) */ protected final <T> T report(String msg, Object... args) throws ReportableException { throw new ReportableException(String.format(msg, args)); }
/** * Report an exception thrown by code that is under the control of the * end-developer. * * @param userGeneratedException an {@link InvocationTargetException} thrown * by an invocation of user-provided code * @throws ReportableException this method never returns normally */ protected final <T> T report(InvocationTargetException userGeneratedException) throws ReportableException { throw new ReportableException(userGeneratedException.getCause()); }
/** * Return a message to the client. This method should not include any data * that was not sent to the server by the client to avoid leaking data. * * @param msg a printf-style format string * @param args arguments for the message * @throws ReportableException this method never returns normally * @see #die(Throwable, String, Object...) */ protected final <T> T report(String msg, Object... args) throws ReportableException { throw new ReportableException(String.format(msg, args)); }
/** * Report an exception thrown by code that is under the control of the * end-developer. * * @param userGeneratedException an {@link InvocationTargetException} thrown * by an invocation of user-provided code * @throws ReportableException this method never returns normally */ protected final <T> T report(InvocationTargetException userGeneratedException) throws ReportableException { throw new ReportableException(userGeneratedException.getCause()); }
Object domain = bean.getTag(Constants.DOMAIN_OBJECT); if (domain == null && detectDeadEntities) { throw new ReportableException(new DeadEntityException( "The requested entity is not available on the server")); accumulator = new HashSet<Object>(); } else { throw new ReportableException("Unsupported collection type " + maybeEntityProxy.getClass().getName());
Object domain = bean.getTag(Constants.DOMAIN_OBJECT); if (domain == null && detectDeadEntities) { throw new ReportableException(new DeadEntityException( "The requested entity is not available on the server")); accumulator = new HashSet<Object>(); } else { throw new ReportableException("Unsupported collection type " + maybeEntityProxy.getClass().getName());
Object domain = bean.getTag(Constants.DOMAIN_OBJECT); if (domain == null && detectDeadEntities) { throw new ReportableException(new DeadEntityException( "The requested entity is not available on the server")); accumulator = new HashSet<Object>(); } else { throw new ReportableException("Unsupported collection type " + maybeEntityProxy.getClass().getName());
accumulator = new HashSet<Object>(); } else { throw new ReportableException("Unsupported collection type" + returnClass.getName()); throw new ReportableException("Unsupported domain type " + returnClass.getCanonicalName());
accumulator = new HashSet<Object>(); } else { throw new ReportableException("Unsupported collection type" + returnClass.getName()); throw new ReportableException("Unsupported domain type " + returnClass.getCanonicalName());