Skip to content

Commit

Permalink
convenient HUException.ofAD_Message(adMessage)
Browse files Browse the repository at this point in the history
  • Loading branch information
teosarca committed May 18, 2017
1 parent 4e12e05 commit a175bab
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
*/

import org.adempiere.exceptions.AdempiereException;
import org.adempiere.util.Check;

/**
* Root of Handling Units module exceptions hierarchy.
Expand All @@ -32,6 +33,11 @@
*/
public class HUException extends AdempiereException
{
public static final HUException ofAD_Message(final String adMessage)
{
final String adMessageEffective = !Check.isEmpty(adMessage, true) ? adMessage : "Error";
return new HUException("@" + adMessageEffective + "@");
}

/**
*
Expand Down

0 comments on commit a175bab

Please sign in to comment.