View source
class thx.error.NullArgument extends Error
Available on all platforms
NullArgument
is used to detect if arguments of methods are null
or empty values.
It should not be used with its contructor but using the static extensions:
public function capitalize(text : String) {
NullArgument.throwIfNull(text);
// ...
}
Class Fields
static function throwIfEmpty(expr:Dynamic):Dynamic
Like throwIfNull
but also throws an exception if the passed argument is empty.
The concept of emptiness applies to String, Array, Iterator and Iterable.
static function throwIfNull<T>(expr:Null<T>):Dynamic
Throws an exception of type NullArgument
if the passed identifier (usually
a function argument name) is null
.