Lumiera  0.pre.03
»edityourfreedom«
error.hpp File Reference

Go to the source code of this file.

Description

Lumiera error handling (C++ interface).

This header declares the Lumiera exception hierarchy, plus some of the most commonly used error flag values. Within Lumiera, C-style error states and C++-style exceptions are tightly integrated. Creating an exception sets the error flag, and there are helpers available to throw an exception automatically when a unclear error state is detected.

See also
error-state.c
error.hpp

Definition in file error.hpp.

#include "include/logging.h"
#include "include/lifecycle.h"
#include "lib/error.h"
#include <exception>
#include <string>

Classes

class  Error
 Interface and Base definition for all Lumiera Exceptions. More...
 
class  LumieraError< eID, PAR >
 Derived specific exceptions within Lumiera's exception hierarchy. More...
 

Typedefs

using Config = LumieraError< LERR_(CONFIG), Invalid >
 
using CStr = const char *
 
using External = LumieraError< LERR_(EXTERNAL)>
 
using Fatal = LumieraError< LERR_(FATAL), Logic >
 
using Flag = LumieraError< LERR_(FLAG), State >
 
using Invalid = LumieraError< LERR_(INVALID)>
 
using Logic = LumieraError< LERR_(LOGIC)>
 
using State = LumieraError< LERR_(STATE)>
 

Macros

#define _STDBOOL_H
 
#define ERROR_LOG_AND_IGNORE(_FLAG_, _OP_DESCR_)
 convenience shortcut for a sequence of catch blocks just logging and consuming an error. More...
 
#define LERR_(_NAME_)
 

Functions

void assertion_terminate (const string &location)
 throw an error::Fatal indicating "assertion failure" More...
 
CStr detailInfo ()
 
void install_unexpectedException_handler ()
 install our own handler for undeclared exceptions. More...
 
 LUMIERA_ERROR_DECLARE (EXCEPTION)
 error-ID for unspecified exceptions More...
 
 LUMIERA_ERROR_DECLARE (LOGIC)
 contradiction to internal logic assumptions detected More...
 
 LUMIERA_ERROR_DECLARE (FATAL)
 unable to cope with, internal logic floundered More...
 
 LUMIERA_ERROR_DECLARE (CONFIG)
 execution aborted due to misconfiguration More...
 
 LUMIERA_ERROR_DECLARE (STATE)
 unforeseen internal state More...
 
 LUMIERA_ERROR_DECLARE (FLAG)
 non-cleared lumiera errorstate from C code More...
 
 LUMIERA_ERROR_DECLARE (INVALID)
 invalid input or parameters encountered More...
 
 LUMIERA_ERROR_DECLARE (EXTERNAL)
 failure in external service the application relies on More...
 
 LUMIERA_ERROR_DECLARE (ASSERTION)
 assertion failure More...
 
 LUMIERA_ERROR_DECLARE (LIFECYCLE)
 Lifecycle assumptions violated. More...
 
 LUMIERA_ERROR_DECLARE (WRONG_TYPE)
 runtime type mismatch More...
 
 LUMIERA_ERROR_DECLARE (ITER_EXHAUST)
 end of sequence reached More...
 
 LUMIERA_ERROR_DECLARE (CAPACITY)
 predefined fixed storage capacity More...
 
 LUMIERA_ERROR_DECLARE (INDEX_BOUNDS)
 index out of bounds More...
 
 LUMIERA_ERROR_DECLARE (BOTTOM_VALUE)
 invalid or NIL value More...
 
 LUMIERA_ERROR_DECLARE (UNCONNECTED)
 missing connection More...
 
 LUMIERA_ERROR_DECLARE (UNIMPLEMENTED)
 unimplemented feature More...
 
void lumiera_unexpectedException () noexcept
 global function for handling unknown exceptions encountered at functions declaring not to throw this kind of exception. More...
 
template<class EX >
void maybeThrow (string description="")
 Check the lumiera error state and throw a specific exception in case a non-cleared errorflag is detected. More...
 
void throwOnError ()
 Check the lumiera error state, which maybe was set by C-code. More...
 

Namespaces

 lumiera
 Lumiera public interface.
 
 lumiera::error
 

Macro Definition Documentation

◆ _STDBOOL_H

#define _STDBOOL_H

Definition at line 42 of file error.hpp.

◆ LERR_

#define LERR_ (   _NAME_)

Definition at line 58 of file error.hpp.

Referenced by WLink< TimelineWidget >::__ensureAlive(), ScopedCollection< CON >::__ensureSufficientCapacity(), DiffApplicationStrategy< vector< E, ARGS... > >::__expect_found(), DiffApplicationStrategy< vector< E, ARGS... > >::__expect_further_elements(), DiffApplicationStrategy< vector< E, ARGS... > >::__expect_in_target(), Entry::__must_be_FREE(), Entry::__must_not_be_FREE(), Entry::__must_not_be_NIL(), PlacementRef< MObject >::access(), BuffHandle::accessAs(), ThreadLocalPtr< TAR >::accessChecked(), MORef< MO >::attach(), BufferProvider::attachTypeHandler(), UndoMutation::captureState(), ExceptionError_test::checkErrorFlagPropagation(), ExceptionError_test::checkErrorIntegration(), InPlaceAnyHolder_useCommonBase< BA >::convert2base(), SessionImpl::detach(), DependencyFactory< OBJ >::disable(), Variant< TYPES >::Buff< TY >::downcast(), Command::duplicate_detected(), CommandQueue::feed(), PanelLocator::find_or_create(), PlaybackController::get(), Command::get(), InPlaceAnyHolder< siz, InPlaceAnyHolder_useCommonBase< BA > >::get(), InPlaceAnyHolder< siz, AccessPolicy >::EmptyBuff::getBase(), CommandInstanceManager::getCloneOrInstance(), CommandInstanceManager::getInstance(), Scope::getParent(), MORef< MO >::getPlacement(), MementoTie< SIG, MEM >::getState(), InteractionDirector::getWorkspaceWindow(), PlacementIndex::insert(), SessionCommandService::invoke(), SimpleClosure< SIG >::invoke(), StorageHolder< SIG, MEM >::invoke(), ScopePath::navigate(), CommandInstanceManager::newInstance(), SearchPathSplitter::next(), OutputMapping< DEF >::Resolver::operator Target(), Mutation::operator()(), OptionalRef< proc::mobject::builder::ModelPortRegistry >::operator()(), MediaFactory::operator()(), ItemWrapper< VAL >::operator*(), ItemWrapper< TY & >::operator*(), SessManagerImpl::operator->(), MORef< MO >::operator->(), CommandSetup::operator=(), ScopedCollection< CON >::operator[](), LinkedElements< proc::engine::JobTicket::Prerequisite >::operator[](), Frames::parse(), Seconds::parse(), Index< POA >::sumClusters(), BuffHandle::takeOwnershipFor(), NotificationService::triggerGuiShutdown(), Key::useTypeHandlerFrom(), and Error::~Error().

◆ ERROR_LOG_AND_IGNORE

#define ERROR_LOG_AND_IGNORE (   _FLAG_,
  _OP_DESCR_ 
)