:right-sidebar: True Exception =================================================================== .. currentmodule:: gi.repository.JavaScriptCore .. class:: Exception(**properties: ~typing.Any) :no-contents-entry: Superclasses: :class:`~gi.repository.GObject.Object` JSCException represents a JavaScript exception. Constructors ------------ .. rst-class:: interim-class .. class:: Exception :no-index: .. classmethod:: new(context: ~gi.repository.JavaScriptCore.Context, message: str) -> ~gi.repository.JavaScriptCore.Exception Create a new :obj:`~gi.repository.JavaScriptCore.Exception` in ``context`` with ``message``\. :param context: a :obj:`~gi.repository.JavaScriptCore.Context` :param message: the error message .. classmethod:: new_with_name(context: ~gi.repository.JavaScriptCore.Context, name: str, message: str) -> ~gi.repository.JavaScriptCore.Exception Create a new :obj:`~gi.repository.JavaScriptCore.Exception` in ``context`` with ``name`` and ``message``\. :param context: a :obj:`~gi.repository.JavaScriptCore.Context` :param name: the error name :param message: the error message Methods ------- .. rst-class:: interim-class .. class:: Exception :no-index: .. method:: get_backtrace_string() -> str | None Get a string with the exception backtrace. .. method:: get_column_number() -> int Get the column number at which ``exception`` happened. .. method:: get_line_number() -> int Get the line number at which ``exception`` happened. .. method:: get_message() -> str Get the error message of ``exception``\. .. method:: get_name() -> str Get the error name of ``exception`` .. method:: get_source_uri() -> str | None Get the source URI of ``exception``\. .. method:: report() -> str Return a report message of ``exception``\, containing all the possible details such us source URI, line, column and backtrace, and formatted to be printed. .. method:: to_string() -> str Get the string representation of ``exception`` error.