@Singleton
public class JatosGuiExceptionThrower
extends java.lang.Object
JatosGuiException
. It
checks whether the call is an Ajax one. It puts the error message into the
RequestScopeMessaging.Modifier and Type | Method and Description |
---|---|
void |
throwAjax(java.lang.Exception e)
Throws a JatosGuiException for an Ajax request (doesn't return a view but
a simple text) with the exception's message.
|
void |
throwAjax(java.lang.Exception e,
int httpStatus)
Throws a JatosGuiException for an Ajax request (doesn't return a view but
a simple text) with the exception's message.
|
void |
throwAjax(java.lang.String errorMsg,
int httpStatus)
Throws a JatosGuiException for an Ajax request (doesn't return a view)
with the given error msg and HTTP status.
|
void |
throwHome(java.lang.Exception e)
Throws a JatosGuiException.
|
void |
throwRedirect(java.lang.Exception e,
play.api.mvc.Call call)
Throws a JatosGuiException that either redirects to the given call if
it's a non-Ajax request - or returns the exception's message if it's a
Ajax request.
|
void |
throwStudy(java.lang.Exception e,
java.lang.Long studyId)
Throws a JatosGuiException.
|
void |
throwStudy(java.lang.String errorMsg,
int httpStatus,
java.lang.Long studyId)
Throws a JatosGuiException with the given error msg and HTTP status.
|
public void throwAjax(java.lang.String errorMsg, int httpStatus) throws JatosGuiException
JatosGuiException
public void throwAjax(java.lang.Exception e) throws JatosGuiException
JatosGuiException
public void throwAjax(java.lang.Exception e, int httpStatus) throws JatosGuiException
JatosGuiException
public void throwRedirect(java.lang.Exception e, play.api.mvc.Call call) throws JatosGuiException
JatosGuiException
public void throwHome(java.lang.Exception e) throws JatosGuiException
JatosGuiException
public void throwStudy(java.lang.String errorMsg, int httpStatus, java.lang.Long studyId) throws JatosGuiException
JatosGuiException
public void throwStudy(java.lang.Exception e, java.lang.Long studyId) throws JatosGuiException
JatosGuiException