package utils.assert
{
/**
* Assert that an object is null.
*
Assert.isNull(value, "The value must be null");* @param object the object to check * @param message the error message to use if the assertion fails * @throws org.as3commons.lang.IllegalArgumentError if the object is not
null
*/
public function assertNotNull(object:Object, message:String = ""):void
{
if (object == null)
{
if (message == null || message.length == 0)
{
message = "[Assertion failed] - this argument is required; it must not null";
}
throw new Error(message);
}
}
}