KozExceptions

KozExceptions

Set of some useful exceptions.

Author:
Source:

Methods

(static) abstractClass()

Throw this exception when anyone tries to create an instance of your abstract class.

Source:

(static) invalidArgument(argument, messageopt)

Throw this exception when you encountered any invalid argument.

Parameters:
Name Type Attributes Description
argument string | Object

String or any object. You can pass here, for example, the name of the argument, or an object consisting of the name and value.

message string <optional>

Any string you want.

Source:

(static) missingArgument(argument, messageopt)

Throw this exception when the user code didn't pass you any mandatory argument.

Parameters:
Name Type Attributes Description
argument string | Object

String or any object. You can pass here, for example, the name of the argument, or an object consisting of the name and value.

message string <optional>

Any string you want.

Source:

(static) notImplementedYet()

Just a stub for your code you plan to implement in the future.

Source:

(static) unresolvedDependency(libraryopt)

This exception is supposed to be thrown when you check the existence of an object or function from any external library, which expected to be in the scope, and suddenly you find out that it doesn't exist there.

Parameters:
Name Type Attributes Description
library string <optional>

Name of the missing library.

Source: