indiantarget / quimeraengine

0 stars 0 forks source link

Assertions improvement: Different assertion macros for different severities #540

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Assertions are not only used to warn about certain dangerous situations but, in 
certain cases, also to to detect errors. There will be 3 kinds of assertions:
-Deprecation: QE_ASSERT_DEPRECATED, used to warn about the use of a deprecated 
feature.
-Warning: QE_ASSERT_WARNING, used to warn about a dangerous or strange 
situation, depending on the context.
-Error: QE_ASSERT_ERROR, used to warn about an erroneous input argument, some 
unexpected behavior that will cause a real error later, or an erroneous result.

The TraceFailedAssert function must be expanded, receiving a new parameter 
called eAssertionType of type EQAssertionType.
EQAssertionType is an enumeration win the following values:
-Deprecation
-Warning
-Error

Every macro will be a copy of QE_ASSERT, but putting the corresponding 
enumration value when calling the tracing function.

Existing calls to QE_ASSERT should be reviewed and converted to either 
QE_ASSERT_WARNING or QE_ASSERT_ERROR.

Original issue reported on code.google.com by Lince3D@gmail.com on 29 Apr 2014 at 4:59

GoogleCodeExporter commented 9 years ago

Original comment by Lince3D@gmail.com on 29 Apr 2014 at 5:04

GoogleCodeExporter commented 9 years ago

Original comment by Lince3D@gmail.com on 5 Sep 2014 at 7:19

GoogleCodeExporter commented 9 years ago

Original comment by Lince3D@gmail.com on 5 Sep 2014 at 9:59

GoogleCodeExporter commented 9 years ago

Original comment by Lince3D@gmail.com on 6 Sep 2014 at 1:55