emacs-module-0.1: Utilities to write Emacs dynamic modules

Copyright(c) Sergey Vinokurov 2018
LicenseBSD3-style (see LICENSE)
Maintainerserg.foo@gmail.com
Safe HaskellNone
LanguageHaskell2010

Emacs.Module.Errors

Description

This module defines various kinds of exception that this library

Synopsis

Documentation

data EmacsThrow Source #

A Haskell exception used to signal a throw exit performed by an Emacs function.

Unlikely to be needed when developing Emacs extensions.

data UserError Source #

Error thrown to emacs by Haskell functions when anything goes awry.

mkUserError Source #

Arguments

:: WithCallStack 
=> Doc Void

Function name

-> Doc Void

Message body

-> UserError 

data EmacsError Source #

A high-level error thrown when an Emacs function fails.

mkEmacsError Source #

Arguments

:: WithCallStack 
=> Doc Void

Message

-> Doc Void

Error data from Emacs

-> EmacsError 

data EmacsInternalError Source #

A low-level error thrown when assumptions of this package are violated and it's not safe to proceed further.

reportAllErrorsToEmacs Source #

Arguments

:: Env 
-> IO a

Result to return on error.

-> ((Throws EmacsInternalError, Throws EmacsError, Throws UserError, Throws EmacsThrow) => IO a) 
-> IO a 

Catch all errors this package might throw in an IO action and make Emacs aware of them.

This is a convenience function intended to be used around exported initialise entry point into an Emacs module.