Fixed major issues reported by sonar (Preserve Stack Trace)

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/HEAD@63502 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Tuna Aksoy
2014-03-02 22:36:31 +00:00
parent 8c994439be
commit 8f18f765d3
5 changed files with 40 additions and 40 deletions

View File

@@ -227,7 +227,7 @@ public class RMListOfValuesConstraint extends ListOfValuesConstraint
} }
catch (TypeConversionException e) catch (TypeConversionException e)
{ {
throw new ConstraintException(ERR_NON_STRING, value); throw new ConstraintException(ERR_NON_STRING, value, e);
} }
// check that the value is in the set of allowed values // check that the value is in the set of allowed values
if (isCaseSensitive()) if (isCaseSensitive())

View File

@@ -197,7 +197,7 @@ public class BootstrapTestDataGet extends DeclarativeWebScript
} }
catch (UnsupportedEncodingException error) catch (UnsupportedEncodingException error)
{ {
throw new AlfrescoRuntimeException("The Character Encoding '" + charsetName + "' is not supported."); throw new AlfrescoRuntimeException("The Character Encoding '" + charsetName + "' is not supported.", error);
} }
Location location = new Location(filePlan); Location location = new Location(filePlan);
importerService.importView(viewReader, location, null, null); importerService.importView(viewReader, location, null, null);

View File

@@ -83,7 +83,7 @@ public class EmailMapPost extends DeclarativeWebScript
catch (AlfrescoRuntimeException are) catch (AlfrescoRuntimeException are)
{ {
throw new WebScriptException(Status.STATUS_INTERNAL_SERVER_ERROR, throw new WebScriptException(Status.STATUS_INTERNAL_SERVER_ERROR,
are.getMessage()); are.getMessage(), are);
} }
return model; return model;

View File

@@ -144,7 +144,7 @@ public class RmActionPost extends DeclarativeWebScript
} }
catch (JSONException exception) catch (JSONException exception)
{ {
throw new WebScriptException(Status.STATUS_BAD_REQUEST, "Unable to parse request JSON."); throw new WebScriptException(Status.STATUS_BAD_REQUEST, "Unable to parse request JSON.", exception);
} }
// validate input: check for mandatory params. // validate input: check for mandatory params.

View File

@@ -140,7 +140,7 @@ public class RmEventPut extends RMEventBase
} }
catch (AlfrescoRuntimeException are) catch (AlfrescoRuntimeException are)
{ {
throw new WebScriptException(Status.STATUS_BAD_REQUEST, are.getLocalizedMessage()); throw new WebScriptException(Status.STATUS_BAD_REQUEST, are.getLocalizedMessage(), are);
} }
return canEditEvent; return canEditEvent;