revoke method
Revokes this error from the ErrorReporter.
Call this when the exception has been caught and handled gracefully, and should not count as a test failure.
Returns true if the error was successfully revoked, false if it was not found in the reporter (possibly already revoked).
Example:
try {
// Some code that might fail
d4rt.eval('badCode');
} catch (e) {
if (e is SourceCodeException) {
// Handle the error gracefully
print('Handled parse error');
e.revoke(); // Don't count this as a test failure
}
}
Implementation
bool revoke() {
return ErrorReporter.revokeError(this);
}