[Minor] added ServiceResult.error(String)

This commit is contained in:
Robert von Burg 2014-01-13 22:29:39 +01:00
parent fa72314fcf
commit a82cb7ae39
1 changed files with 4 additions and 0 deletions

View File

@ -116,6 +116,10 @@ public class ServiceResult implements Serializable {
return new ServiceResult(ServiceResultState.WARNING, warning, t);
}
public static ServiceResult error(String error) {
return new ServiceResult(ServiceResultState.FAILED, error, null);
}
public static ServiceResult failed(String error, Throwable t) {
return new ServiceResult(ServiceResultState.FAILED, error, t);
}