There are method with parameter "withError", e.g.:
Code:
/**
* Find text for a resource / literal-id within the current runtime
* instance.
*/
public static String findLiteral(String resourceName, String literalId, boolean withError)
{
...
}
Of withError is set to false, then a default value is returned - otherwise an Error is thrown.
Kind regards! Björn