The policy for the DlangGraphicsWG about errors is the following:
-
Internal functions may use any mechanism, left at the discretion of the implementer
-
In the public parts of the library that have to follow
-betterC
(TBD):
-
If the function is publicly exported by a module and has to report an error message, use
Result!T
a combination of aT
an a messagestring
. If the messagestring
is null then theT
is valid. -
Else if the function doesn't have to report an error message, use error codes (
bool
return andout
params).
- In the parts of the library that don't have to follow
-betterC
(TBD)
Use normal D exceptions.