Open shinobu opened 8 years ago
I have reworked the names
I kept the previous FILTER_ERROR
(now NON_FATAL_ERROR
) - because OntoWiki could theoretically be checked in the ErrorController.php
(it checks for codes above 0 and below 2k and handles them differently)
done and rebased onto your pull request @white-gecko
This pull request adds error codes for all Exceptions except for
NoViableAltException
andEarlyExitException
as those both are used only in the Sparql Parser (and I doubt messing with it would be a good idea)I created the following Error Codes:
DEFAULT_ERROR
for 0 as 0 is the default output from thegetCode()
function of Exceptions and the places where it appears most likely only wanted to use the third optional parameter for creating an Exception.DATABASE_ERROR
andPARSER_ERROR
for -1 as all those files used that number as general exception for the class (most likely only to use the third optional parameter as well)FILTER_ERROR
for 1 for the same reason asDATABASE_ERROR
andPARSER_ERROR
NO_ERROR
for 20 as the Exceptions with this number are ignored