DCL

An elegant OOP with mixins + AOP for JavaScript.

debug.js

Version 2.x

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 is defined in dcl/debug.js. It adds properties to the main dcl module, which it returns.

Module API

Main property:

  • dcl.log() - logs class and/or object metainformation to console.log

Error object:

  • dcl.DclError - the base for all errors
  • dcl.CycleError - thrown when there is an unresolvable cycle in list of declared bases
  • dcl.SuperError - thrown when the next-in-line property is not a function, and a super call cannot be made
  • dcl.ChainingError - thrown when composing a class with different chaining directives for the same method