Copyright | Will Thompson and Iñaki García Etxebarria |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
JSCException represents a JavaScript exception.
Synopsis
- newtype Exception = Exception (ManagedPtr Exception)
- class (GObject o, IsDescendantOf Exception o) => IsException o
- toException :: (MonadIO m, IsException o) => o -> m Exception
- exceptionGetBacktraceString :: (HasCallStack, MonadIO m, IsException a) => a -> m (Maybe Text)
- exceptionGetColumnNumber :: (HasCallStack, MonadIO m, IsException a) => a -> m Word32
- exceptionGetLineNumber :: (HasCallStack, MonadIO m, IsException a) => a -> m Word32
- exceptionGetMessage :: (HasCallStack, MonadIO m, IsException a) => a -> m Text
- exceptionGetName :: (HasCallStack, MonadIO m, IsException a) => a -> m Text
- exceptionGetSourceUri :: (HasCallStack, MonadIO m, IsException a) => a -> m (Maybe Text)
- exceptionNew :: (HasCallStack, MonadIO m, IsContext a) => a -> Text -> m Exception
- exceptionNewWithName :: (HasCallStack, MonadIO m, IsContext a) => a -> Text -> Text -> m Exception
- exceptionReport :: (HasCallStack, MonadIO m, IsException a) => a -> m Text
- exceptionToString :: (HasCallStack, MonadIO m, IsException a) => a -> m Text
Exported types
Memory-managed wrapper type.
Instances
Eq Exception Source # | |
GObject Exception Source # | |
Defined in GI.JavaScriptCore.Objects.Exception | |
ManagedPtrNewtype Exception Source # | |
Defined in GI.JavaScriptCore.Objects.Exception toManagedPtr :: Exception -> ManagedPtr Exception | |
TypedObject Exception Source # | |
Defined in GI.JavaScriptCore.Objects.Exception | |
HasParentTypes Exception Source # | |
Defined in GI.JavaScriptCore.Objects.Exception | |
IsGValue (Maybe Exception) Source # | Convert |
Defined in GI.JavaScriptCore.Objects.Exception gvalueGType_ :: IO GType gvalueSet_ :: Ptr GValue -> Maybe Exception -> IO () gvalueGet_ :: Ptr GValue -> IO (Maybe Exception) | |
type ParentTypes Exception Source # | |
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
(GObject o, IsDescendantOf Exception o) => IsException o Source # | |
Defined in GI.JavaScriptCore.Objects.Exception |
toException :: (MonadIO m, IsException o) => o -> m Exception Source #
Methods
Click to display all available methods, including inherited ones
Methods
bindProperty, bindPropertyFull, forceFloating, freezeNotify, getv, isFloating, notify, notifyByPspec, ref, refSink, report, runDispose, stealData, stealQdata, thawNotify, toString, unref, watchClosure.
Getters
getBacktraceString, getColumnNumber, getData, getLineNumber, getMessage, getName, getProperty, getQdata, getSourceUri.
Setters
getBacktraceString
exceptionGetBacktraceString Source #
:: (HasCallStack, MonadIO m, IsException a) | |
=> a |
|
-> m (Maybe Text) | Returns: the exception backtrace string or |
Get a string with the exception backtrace.
getColumnNumber
exceptionGetColumnNumber Source #
:: (HasCallStack, MonadIO m, IsException a) | |
=> a |
|
-> m Word32 | Returns: the column number of |
Get the column number at which exception
happened.
getLineNumber
exceptionGetLineNumber Source #
:: (HasCallStack, MonadIO m, IsException a) | |
=> a |
|
-> m Word32 | Returns: the line number of |
Get the line number at which exception
happened.
getMessage
:: (HasCallStack, MonadIO m, IsException a) | |
=> a |
|
-> m Text | Returns: the |
Get the error message of exception
.
getName
:: (HasCallStack, MonadIO m, IsException a) | |
=> a |
|
-> m Text | Returns: the |
Get the error name of exception
getSourceUri
exceptionGetSourceUri Source #
:: (HasCallStack, MonadIO m, IsException a) | |
=> a |
|
-> m (Maybe Text) | Returns: the the source URI of |
Get the source URI of exception
.
new
:: (HasCallStack, MonadIO m, IsContext a) | |
=> a |
|
-> Text |
|
-> m Exception | Returns: a new |
Create a new Exception
in context
with message
.
newWithName
:: (HasCallStack, MonadIO m, IsContext a) | |
=> a |
|
-> Text |
|
-> Text |
|
-> m Exception | Returns: a new |
Create a new Exception
in context
with name
and message
.
report
:: (HasCallStack, MonadIO m, IsException a) | |
=> a |
|
-> 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
:: (HasCallStack, MonadIO m, IsException a) | |
=> a |
|
-> m Text | Returns: the string representation of |
Get the string representation of exception
error.