Home Reference Source
import {Debug} from 'guide4you/src/Debug.js'
public class | source

Debug

This class provides different debug behaviour based on the SWITCH_DEBUG build flag

Static Method Summary

Static Public Methods
public static

a default error handler for .catch functions

public static

error(msg: string)

prints an error

public static

info(msg: string)

Prints an info note if in debug mode

public static

if in release mode all thrown errors in the callback are catched and the program is continued

public static

warn(msg: string)

prints a warning

Static Public Methods

public static defaultErrorHandler(message: string) source

a default error handler for .catch functions

Params:

NameTypeAttributeDescription
message string

public static error(msg: string) source

prints an error

Params:

NameTypeAttributeDescription
msg string

public static info(msg: string) source

Prints an info note if in debug mode

Params:

NameTypeAttributeDescription
msg string

public static tryOrThrow(cb: function) source

if in release mode all thrown errors in the callback are catched and the program is continued

Params:

NameTypeAttributeDescription
cb function

public static warn(msg: string) source

prints a warning

Params:

NameTypeAttributeDescription
msg string