Details
-
Improvement
-
Status: Resolved
-
Normal
-
Resolution: Done
-
None
-
None
-
Froyo
-
Enhancement
-
This release includes improvements to the evaluator, meaning some compilation warnings now take less time to compute.
-
Needs Assessment
Description
Release note: Do not create exceptions for stacktrace information
Currently, when the evaluator runs across a valid warning it will create an exception in the optionally_fail method. That exception is passed into the error handling code (acceptor) that later decides if the issue warrants erring out, printing a warning with a stacktrace, printing a warning without a stacktrace, or ignoring. There is no use in creating exceptions when it is known they will not be used. It should be possible to check the validator/acceptor from optionally_fail and only create the exception when the correct conditions hold.
------
Original note: Currently when the evaluator runs across a valid warning it will create an exception in the `optionally_fail` method. That exception is passed into the error handling code (acceptor) that later decides if the issue warrants erring out, printing a warning with a stacktrace, printing a warning without a stacktrace, or ignoring.
Creating exceptions/backtraces are expensive in some environments, we should only create them when we know we will print the information they contain. There is no use in creating them when we know we will not use them.
It should be possible to check the validator/acceptor from optionally_fail and only create the exception when the correct conditions hold.