Debuggability is one of the main concerns for any public library. It should provide a concise picture of produced, yet it should not affect size nor performance of said library.
debug.js is a debug helper for
dcl. It augments dcl()
with enhanced error reporting, and provides debugging helpers. This module was
designed primarily to be used during development.
It can be included with following commands:
1 2 3 4 5 6 7 8 9 10 11 12 13
The return value of this module is an object, which is called
dclDebug in this documentation.
- dclDebug.log() - logs class and/or object metainformation to
General error object:
- dclDebug.DclError - the base for all errors
“Class” composition error:
- dclDebug.CycleError - thrown when there is an unresolvable cycle in list of declared bases
Supercall and around advice errors:
- dclDebug.SuperCallError - thrown when an argument of dcl.superCall() or dcl.around() decorators is not a function
- dclDebug.SuperError - thrown when the next-in-line property is not a function, and a super call cannot be made
- dclDebug.SuperResultError - thrown when an argument of dcl.superCall() or dcl.around() decorators does not return a function (likely the double function pattern was not followed — see dcl.superCall() for details)