Skip to content

ym.Exception

Initialization

Constructor(message, name, errorCode, avoidConsoleMessage)

  • Parameters
  • message

    • Description: A meaningful error description.
    • Data type: string or object
    • Default value: "An error happened."
  • name

    • Data type: string
    • Default value: "Exception"
  • errorCode

    • Data type: ym.ErrorCodes
    • Default value: ym.ErrorCodes.EXCEPTION
  • avoidConsoleMessage

    • Data type: bool
    • Default value: false

Example Call

throw new ym.UnknownException("Something strange happened!");

Methods

Writes a message in the developer tool that informs about an obsolete component.

  • Parameters
  • component

    • Description: The component that is marked as obsolete.
    • Data type: function
  • link

    • Description: The link to the documentation of the new or changed component.
    • Data type: string
  • expirationDate

    • Description: The date on which the component is removed.
    • Data type: date

error(args)

Writes an error message in the developer tool.

  • Parameters
  • args
    • Description: Several arguments and data types are possible.

info(args)

Writes a message in the developer tool.

  • Parameters
  • args
    • Description: Several arguments and data types are possible.

log(args)

Makes a log entry in the developer tool.

  • Parameters
  • args
    • Description: Several arguments and data types are possible.

notify(msg)

Writes a notification in the developer tool.

  • Parameters
  • msg
    • Description: Notification
    • Data type: string

warn(args)

Writes a warning in the developer tool.

  • Parameters
  • args
    • Description: Several arguments and data types are possible.