gi-javascriptcore-6.0.3: JavaScriptCore bindings
CopyrightWill Thompson and Iñaki García Etxebarria
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellSafe-Inferred
LanguageHaskell2010

GI.JavaScriptCore.Objects.Exception

Description

JSCException represents a JavaScript exception.

Synopsis

Exported types

newtype Exception Source #

Memory-managed wrapper type.

Constructors

Exception (ManagedPtr Exception) 

Instances

Instances details
Eq Exception Source # 
Instance details

Defined in GI.JavaScriptCore.Objects.Exception

GObject Exception Source # 
Instance details

Defined in GI.JavaScriptCore.Objects.Exception

ManagedPtrNewtype Exception Source # 
Instance details

Defined in GI.JavaScriptCore.Objects.Exception

Methods

toManagedPtr :: Exception -> ManagedPtr Exception

TypedObject Exception Source # 
Instance details

Defined in GI.JavaScriptCore.Objects.Exception

Methods

glibType :: IO GType

HasParentTypes Exception Source # 
Instance details

Defined in GI.JavaScriptCore.Objects.Exception

IsGValue (Maybe Exception) Source #

Convert Exception to and from GValue. See toGValue and fromGValue.

Instance details

Defined in GI.JavaScriptCore.Objects.Exception

Methods

gvalueGType_ :: IO GType

gvalueSet_ :: Ptr GValue -> Maybe Exception -> IO ()

gvalueGet_ :: Ptr GValue -> IO (Maybe Exception)

type ParentTypes Exception Source # 
Instance details

Defined in GI.JavaScriptCore.Objects.Exception

type ParentTypes Exception = '[Object]

class (GObject o, IsDescendantOf Exception o) => IsException o Source #

Type class for types which can be safely cast to Exception, for instance with toException.

Instances

Instances details
(GObject o, IsDescendantOf Exception o) => IsException o Source # 
Instance details

Defined in GI.JavaScriptCore.Objects.Exception

toException :: (MonadIO m, IsException o) => o -> m Exception Source #

Cast to Exception, for types for which this is known to be safe. For general casts, use castTo.

Methods

getBacktraceString

exceptionGetBacktraceString Source #

Arguments

:: (HasCallStack, MonadIO m, IsException a) 
=> a

exception: a Exception

-> m (Maybe Text)

Returns: the exception backtrace string or Nothing.

Get a string with the exception backtrace.

getColumnNumber

exceptionGetColumnNumber Source #

Arguments

:: (HasCallStack, MonadIO m, IsException a) 
=> a

exception: a Exception

-> m Word32

Returns: the column number of exception.

Get the column number at which exception happened.

getLineNumber

exceptionGetLineNumber Source #

Arguments

:: (HasCallStack, MonadIO m, IsException a) 
=> a

exception: a Exception

-> m Word32

Returns: the line number of exception.

Get the line number at which exception happened.

getMessage

exceptionGetMessage Source #

Arguments

:: (HasCallStack, MonadIO m, IsException a) 
=> a

exception: a Exception

-> m Text

Returns: the exception error message.

Get the error message of exception.

getName

exceptionGetName Source #

Arguments

:: (HasCallStack, MonadIO m, IsException a) 
=> a

exception: a Exception

-> m Text

Returns: the exception error name.

Get the error name of exception

getSourceUri

exceptionGetSourceUri Source #

Arguments

:: (HasCallStack, MonadIO m, IsException a) 
=> a

exception: a Exception

-> m (Maybe Text)

Returns: the the source URI of exception, or Nothing.

Get the source URI of exception.

new

exceptionNew Source #

Arguments

:: (HasCallStack, MonadIO m, IsContext a) 
=> a

context: a Context

-> Text

message: the error message

-> m Exception

Returns: a new Exception.

Create a new Exception in context with message.

newWithName

exceptionNewWithName Source #

Arguments

:: (HasCallStack, MonadIO m, IsContext a) 
=> a

context: a Context

-> Text

name: the error name

-> Text

message: the error message

-> m Exception

Returns: a new Exception.

Create a new Exception in context with name and message.

report

exceptionReport Source #

Arguments

:: (HasCallStack, MonadIO m, IsException a) 
=> a

exception: a Exception

-> m Text

Returns: a new string with the exception report

Return a report message of exception, containing all the possible details such us source URI, line, column and backtrace, and formatted to be printed.

toString

exceptionToString Source #

Arguments

:: (HasCallStack, MonadIO m, IsException a) 
=> a

exception: a Exception

-> m Text

Returns: the string representation of exception.

Get the string representation of exception error.