This just adds blank templates for error and warning messages so we can throw our own (without having to use bce0044). This is useful for example in ast macros or attributes. You can add a compiler error instead of raising an exception.
For example:
Errors.Add(CompilerErrorFactory.CustomError(lexicalinfo, "Some custom error message"));
or
Errors.Add(CompilerErrorFactory.CustomError("your message"));
or
Errors.Add(new CompilerError("Some custom message"));
Warnings.Add(CompilerWarningFactory.CustomWarning(info, "Custom warning message"));
or
Warnings.Add(new CompilerWarning(info, "Custom message"));
The IDs used are BCE0000 and BCW0000.
Some of the "asserts" in boo.lang.useful could probably be changed to use InvalidNodeForAttribute or CustomError.
I made some of these changes to singletonattribute, onceattribute, and collectionattribute (the latter adds a call to customerror). tests\testcases\errors\bce0000-1.boo tests that customerror.