mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Cosmetic tidy up for last check in.
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@19405 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -117,12 +117,7 @@ public abstract class Tool
|
|||||||
/**
|
/**
|
||||||
* Handle Error Message
|
* Handle Error Message
|
||||||
*
|
*
|
||||||
* @param e exception
|
* @param e exception
|
||||||
*/
|
|
||||||
/**
|
|
||||||
* Handle Error Message
|
|
||||||
*
|
|
||||||
* @param e exception
|
|
||||||
*/
|
*/
|
||||||
protected int handleError(Throwable e)
|
protected int handleError(Throwable e)
|
||||||
{
|
{
|
||||||
@@ -135,14 +130,14 @@ public abstract class Tool
|
|||||||
else if (e instanceof ToolException)
|
else if (e instanceof ToolException)
|
||||||
{
|
{
|
||||||
if (e.getCause() != null)
|
if (e.getCause() != null)
|
||||||
{
|
{
|
||||||
logError(e.getMessage() + " caused by: " + e.getCause().getMessage());
|
logError(e.getMessage() + " caused by: " + e.getCause().getMessage());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
logError(e.getMessage());
|
logError(e.getMessage());
|
||||||
}
|
}
|
||||||
|
|
||||||
// If we are being verbose then show the stack trace as well.
|
// If we are being verbose then show the stack trace as well.
|
||||||
if (toolContext != null && toolContext.isVerbose())
|
if (toolContext != null && toolContext.isVerbose())
|
||||||
{
|
{
|
||||||
@@ -155,7 +150,7 @@ public abstract class Tool
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
logError("The following error has occurred:" + e.getMessage());
|
logError("The following error has occurred:" + e.getMessage());
|
||||||
|
|
||||||
if (toolContext != null && toolContext.isVerbose())
|
if (toolContext != null && toolContext.isVerbose())
|
||||||
{
|
{
|
||||||
StringWriter stringWriter = new StringWriter();
|
StringWriter stringWriter = new StringWriter();
|
||||||
@@ -164,7 +159,7 @@ public abstract class Tool
|
|||||||
logError(stringWriter.toString());
|
logError(stringWriter.toString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// return generic error code
|
// return generic error code
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user