Assert
ASSERT is a convenient shorthand for inserting debugging checks, but is not useful for reporting ordinary messages and errors.
- we can give
ASSERTa value that is always expects to evaluate to true.- if it does,
ASSERTdoes nothing further. - if it doesn't, an
ASSERT_FAILUREexception is raised.
- if it does,
- if we don't pass a message, a default "assertion failed" will be used.
ASSERT v_user is not null, 'user not found, check the users table';