| |
ID | STAT-10 |
Title | Every assert call shall have an error ID and a message as the 2nd and 3rd inputs. |
Priority | Mandatory |
Severity level | 5 |
Description | Every call to the built-in assert function shall have an error identifier and a message as second and third inputs. |
Rationale | Including an identifier allows for better testing and exception handling. Including a proper error message directly clarifies the problem. |
assert(~isempty(list))
assert(~isempty(list), 'ClassName:MethodName:ListIsEmpty', 'The list shall not be empty.')