Modernise Unknown Exception handler and Exception messages

This commit is contained in:
Fischlurch 2018-04-02 01:48:51 +02:00
parent 21e47e014a
commit 89d93a13e4
88 changed files with 201 additions and 175 deletions

View file

@ -59,8 +59,8 @@ namespace backend {
using lib::Literal; using lib::Literal;
namespace error = lumiera::error; namespace error = lumiera::error;
using error::LUMIERA_ERROR_STATE; using error::LERR_(STATE);
using error::LUMIERA_ERROR_EXTERNAL; using error::LERR_(EXTERNAL);
typedef struct nobug_flag* NoBugFlag; typedef struct nobug_flag* NoBugFlag;

View file

@ -509,7 +509,7 @@ namespace advice {
{ {
SelfCheckFailure (Literal failure) SelfCheckFailure (Literal failure)
: error::Fatal (string("Failed test: ")+failure : error::Fatal (string("Failed test: ")+failure
,LUMIERA_ERROR_INDEX_CORRUPTED) ,LERR_(INDEX_CORRUPTED))
{ } { }
}; };
} }

View file

@ -92,7 +92,7 @@ namespace facade {
{ {
if (Accessor<FA>::implProxy_) if (Accessor<FA>::implProxy_)
throw error::State("Attempt to open an already opened Facade interface." throw error::State("Attempt to open an already opened Facade interface."
, error::LUMIERA_ERROR_LIFECYCLE); , error::LERR_(LIFECYCLE));
} }
public: public:

View file

@ -55,7 +55,7 @@ using util::_Fmt;
using proc::ConfigResolver; using proc::ConfigResolver;
using lumiera::query::QueryHandler; ///////TODO preliminary interface defined in config-rules.hpp using lumiera::query::QueryHandler; ///////TODO preliminary interface defined in config-rules.hpp
using lumiera::query::LUMIERA_ERROR_CAPABILITY_QUERY; using lumiera::query::LERR_(CAPABILITY_QUERY);
namespace lumiera{ namespace lumiera{

View file

@ -62,7 +62,7 @@ namespace ctrl {
{ {
if (not instance) if (not instance)
throw error::Logic ("GTK UI is not in running state" throw error::Logic ("GTK UI is not in running state"
, error::LUMIERA_ERROR_LIFECYCLE); , error::LERR_(LIFECYCLE));
return *instance; return *instance;
} }

View file

@ -168,7 +168,7 @@ namespace lib {
creator_ = []() -> OBJ* creator_ = []() -> OBJ*
{ {
throw error::Fatal("Service not available at this point of the Application Lifecycle" throw error::Fatal("Service not available at this point of the Application Lifecycle"
,error::LUMIERA_ERROR_LIFECYCLE); ,error::LERR_(LIFECYCLE));
}; };
} }

View file

@ -91,12 +91,12 @@ namespace diff{
if (end_of_target()) if (end_of_target())
throw error::State(_Fmt("Unable to %s element %s from target as demanded; " throw error::State(_Fmt("Unable to %s element %s from target as demanded; "
"no (further) elements in target sequence") % oper % elm "no (further) elements in target sequence") % oper % elm
, LUMIERA_ERROR_DIFF_CONFLICT); , LERR_(DIFF_CONFLICT));
if (*pos_ != elm) if (*pos_ != elm)
throw error::State(_Fmt("Unable to %s element %s from target as demanded; " throw error::State(_Fmt("Unable to %s element %s from target as demanded; "
"found element %s on current target position instead") "found element %s on current target position instead")
% oper % elm % *pos_ % oper % elm % *pos_
, LUMIERA_ERROR_DIFF_CONFLICT); , LERR_(DIFF_CONFLICT));
} }
void void
@ -105,7 +105,7 @@ namespace diff{
if (end_of_target()) if (end_of_target())
throw error::State(_Fmt("Premature end of target sequence, still expecting element %s; " throw error::State(_Fmt("Premature end of target sequence, still expecting element %s; "
"unable to apply diff further.") % elm "unable to apply diff further.") % elm
, LUMIERA_ERROR_DIFF_CONFLICT); , LERR_(DIFF_CONFLICT));
} }
void void
@ -114,7 +114,7 @@ namespace diff{
if (targetPos == orig_.end()) if (targetPos == orig_.end())
throw error::State(_Fmt("Premature end of sequence; unable to locate " throw error::State(_Fmt("Premature end of sequence; unable to locate "
"element %s in the remainder of the target.") % elm "element %s in the remainder of the target.") % elm
, LUMIERA_ERROR_DIFF_CONFLICT); , LERR_(DIFF_CONFLICT));
} }

View file

@ -40,6 +40,7 @@
#include <typeinfo> #include <typeinfo>
#include <iostream> #include <iostream>
using util::cStr;
using util::isnil; using util::isnil;
using std::exception; using std::exception;
@ -51,12 +52,12 @@ namespace lumiera {
* if an exception reaches one of the top-level * if an exception reaches one of the top-level
* catch clauses. * catch clauses.
* @todo to be localised * @todo to be localised
* @todo develop a framework to set more specific yet friendly messages
*/ */
inline const string inline const string
default_usermsg (Error* exception_obj) noexcept default_usermsg (Error* exception_obj) noexcept
{ {
return string("Sorry, Lumiera encountered an internal error. (") return "Sorry, Lumiera encountered an internal error.";
+ util::typeStr(*exception_obj) + ")";
} }
CStr CStr
@ -163,23 +164,59 @@ namespace lumiera {
namespace error namespace error {
{ namespace {
void install_unexpectedException_handler ()
{
std::set_terminate (lumiera_unexpectedException);
}
LifecycleHook schedule_ (ON_BASIC_INIT, &install_unexpectedException_handler);
std::terminate_handler nextHandler = nullptr;
}
void lumiera_unexpectedException () throw() void lumiera_unexpectedException () noexcept
{ {
CCStr is_halted CStr is_halted
= "### Lumiera halted due to an unexpected Error ###"; = "### Lumiera halted due to an unexpected Error ###";
std::cerr << "\n" << is_halted << "\n\n";
ERROR (NOBUG_ON, "%s", is_halted); ERROR (NOBUG_ON, "%s", is_halted);
std::cerr << "\n" << is_halted << "\n\n";
if (CCStr errorstate = lumiera_error ())
try { // -----find-out-about-any-Exceptions--------
auto lastException = std::current_exception();
if (lastException) {
std::rethrow_exception (lastException);
}
} catch(const lumiera::Error& lerr) {
std::cout << "\n+++ Caught Exception " << lerr.getID() << "\n\n";
ERROR (NOBUG_ON, "+++ caught %s\n+++ messg: %s\n+++ descr: %s"
, cStr(util::typeStr(lerr))
, cStr(lerr.getUsermsg())
, cStr(lerr.what())
);
if (not isnil(lerr.rootCause()))
ERROR (NOBUG_ON, "+++ cause: %s",cStr(lerr.rootCause()));
} catch(const std::exception& e) {
ERROR (NOBUG_ON, "Generic Exception: %s", e.what());
std::cout << "+++ Caught Exception \"" << e.what() << "\"\n";
} catch(...) {
ERROR (NOBUG_ON, "FATAL -- unknown exception");
}
if (CStr errorstate = lumiera_error ())
ERROR (NOBUG_ON, "last registered error was....\n%s", errorstate); ERROR (NOBUG_ON, "last registered error was....\n%s", errorstate);
std::terminate(); if (nextHandler)
nextHandler();
else
std::abort();
} }
void assertion_terminate (const string& location) void assertion_terminate (const string& location)
{ {
throw Fatal (location, LUMIERA_ERROR_ASSERTION) throw Fatal (location, LUMIERA_ERROR_ASSERTION)
@ -187,17 +224,6 @@ namespace lumiera {
"an internal consistency check."); "an internal consistency check.");
} }
void install_unexpectedException_handler ()
{
std::set_unexpected (lumiera_unexpectedException);
}
namespace {
LifecycleHook schedule_ (ON_BASIC_INIT, &install_unexpectedException_handler);
}
} // namespace error } // namespace error
} // namespace lumiera } // namespace lumiera

View file

@ -72,7 +72,7 @@
namespace lib { namespace lib {
namespace error = lumiera::error; namespace error = lumiera::error;
using error::LUMIERA_ERROR_INDEX_BOUNDS; using error::LERR_(INDEX_BOUNDS);
using util::unConst; using util::unConst;
@ -495,7 +495,7 @@ namespace lib {
if (!p || index) if (!p || index)
throw error::Logic ("Attempt to access element beyond the end of LinkedElements list" throw error::Logic ("Attempt to access element beyond the end of LinkedElements list"
, LUMIERA_ERROR_INDEX_BOUNDS); , LERR_(INDEX_BOUNDS));
else else
return *p; return *p;
} }

View file

@ -263,7 +263,7 @@ namespace meta {
* do want the pointer itself (and not a pointer to the pointer). We then * do want the pointer itself (and not a pointer to the pointer). We then
* pass the "object" as so called "glvalue" to the `typeid()` function, * pass the "object" as so called "glvalue" to the `typeid()` function,
* so to get the evaluation of RTTI, when applicable. * so to get the evaluation of RTTI, when applicable.
* @warning this function does string transformations behind the scenes, * @warning this function does string transformations behind the scene,
* and thus should not be used in performance critical context. Moreover, * and thus should not be used in performance critical context. Moreover,
* the returned type string is not necessarily exact and re-parsable. * the returned type string is not necessarily exact and re-parsable.
*/ */

View file

@ -80,6 +80,8 @@
namespace lib { namespace lib {
namespace error = lumiera::error; namespace error = lumiera::error;
using error::LERR_(BOTTOM_VALUE);
using error::LERR_(WRONG_TYPE);
using util::isSameObject; using util::isSameObject;
using util::unConst; using util::unConst;
@ -134,7 +136,7 @@ namespace lib {
return asBase; return asBase;
throw error::Logic ("Unable to convert concrete object to Base interface" throw error::Logic ("Unable to convert concrete object to Base interface"
, error::LUMIERA_ERROR_WRONG_TYPE , LERR_(WRONG_TYPE)
); );
} }
}; };
@ -219,7 +221,7 @@ namespace lib {
getBase() const getBase() const
{ {
throw error::Invalid("accessing empty holder" throw error::Invalid("accessing empty holder"
, error::LUMIERA_ERROR_BOTTOM_VALUE); , LERR_(BOTTOM_VALUE));
} }
virtual void virtual void
@ -452,11 +454,11 @@ namespace lib {
if (this->empty()) if (this->empty())
throw error::Invalid("accessing empty holder" throw error::Invalid("accessing empty holder"
, error::LUMIERA_ERROR_BOTTOM_VALUE); ,LERR_(BOTTOM_VALUE));
else else
throw error::Logic ("Attempt to access OpaqueHolder's contents " throw error::Logic ("Attempt to access OpaqueHolder's contents "
"specifying incompatible target type" "specifying incompatible target type"
, error::LUMIERA_ERROR_WRONG_TYPE , LERR_(WRONG_TYPE)
); );
} }

View file

@ -36,7 +36,7 @@
namespace lib { namespace lib {
using lumiera::error::LUMIERA_ERROR_BOTTOM_VALUE; using lumiera::error::LERR_(BOTTOM_VALUE);
@ -88,7 +88,7 @@ namespace lib {
{ {
if (!isValid()) if (!isValid())
throw lumiera::error::Logic ("access to this object is (not/yet) enabled" throw lumiera::error::Logic ("access to this object is (not/yet) enabled"
, LUMIERA_ERROR_BOTTOM_VALUE); , LERR_(BOTTOM_VALUE));
return *ref_; return *ref_;
} }

View file

@ -80,8 +80,8 @@
namespace lib { namespace lib {
namespace error = lumiera::error; namespace error = lumiera::error;
using error::LUMIERA_ERROR_CAPACITY; using error::LERR_(CAPACITY);
using error::LUMIERA_ERROR_INDEX_BOUNDS; using error::LERR_(INDEX_BOUNDS);
@ -329,7 +329,7 @@ namespace lib {
return elements_[index].accessObj(); return elements_[index].accessObj();
throw error::Logic ("Attempt to access not (yet) existing object in ScopedCollection" throw error::Logic ("Attempt to access not (yet) existing object in ScopedCollection"
, LUMIERA_ERROR_INDEX_BOUNDS); , LERR_(INDEX_BOUNDS));
} }
@ -366,7 +366,7 @@ namespace lib {
{ {
if (level_ >= capacity_) if (level_ >= capacity_)
throw error::State ("ScopedCollection exceeding the initially defined capacity" throw error::State ("ScopedCollection exceeding the initially defined capacity"
, LUMIERA_ERROR_CAPACITY); , LERR_(CAPACITY));
} }

View file

@ -55,7 +55,7 @@ namespace lib {
namespace fsys = boost::filesystem; namespace fsys = boost::filesystem;
LUMIERA_ERROR_DECLARE (FILE_NOT_DIRECTORY); ///< path element points at a file instead of a directory LUMIERA_ERROR_DECLARE (FILE_NOT_DIRECTORY); ///< path element points at a file instead of a directory
using error::LUMIERA_ERROR_ITER_EXHAUST; using error::LERR_(ITER_EXHAUST);
/** retrieve the location of the executable */ /** retrieve the location of the executable */
@ -102,7 +102,7 @@ namespace lib {
{ {
if (!isValid()) if (!isValid())
throw error::Logic ("Search path exhausted." throw error::Logic ("Search path exhausted."
,LUMIERA_ERROR_ITER_EXHAUST); ,LERR_(ITER_EXHAUST));
string currentPathElement = pos_->str(); string currentPathElement = pos_->str();
++pos_; ++pos_;

View file

@ -284,13 +284,13 @@ namespace lib {
wait (BF& predicate, Timeout& waitEndTime) wait (BF& predicate, Timeout& waitEndTime)
{ {
bool ok = true; bool ok = true;
while (ok && !predicate()) while (ok and !predicate())
if (waitEndTime) if (waitEndTime)
ok = Cond::timedwait (&waitEndTime); ok = Cond::timedwait (&waitEndTime);
else else
ok = Cond::wait (); ok = Cond::wait ();
if (!ok && lumiera_error_expect(LUMIERA_ERROR_LOCK_TIMEOUT)) return false; if (not ok and lumiera_error_expect(LUMIERA_ERROR_LOCK_TIMEOUT)) return false;
lumiera::throwOnError(); // any other error throws lumiera::throwOnError(); // any other error throws
return true; return true;

View file

@ -101,7 +101,7 @@ namespace lib {
TAR *p(get()); TAR *p(get());
if (!p) if (!p)
throw lumiera::error::State ("dereferencing a thread local NULL pointer" throw lumiera::error::State ("dereferencing a thread local NULL pointer"
,lumiera::error::LUMIERA_ERROR_BOTTOM_VALUE); ,lumiera::error::LERR_(BOTTOM_VALUE));
return p; return p;
} }

View file

@ -77,7 +77,7 @@ namespace time {
return frameGrid.timeOf (lexical_cast<FrameCnt> (match[1])); return frameGrid.timeOf (lexical_cast<FrameCnt> (match[1]));
else else
throw error::Invalid ("unable to parse framecount \""+frameNumber+"\"" throw error::Invalid ("unable to parse framecount \""+frameNumber+"\""
, LUMIERA_ERROR_INVALID_TIMECODE); , LERR_(INVALID_TIMECODE));
} }
@ -145,7 +145,7 @@ namespace time {
} }
else else
throw error::Invalid ("unable to parse \""+seconds+"\" as (fractional)seconds" throw error::Invalid ("unable to parse \""+seconds+"\" as (fractional)seconds"
, LUMIERA_ERROR_INVALID_TIMECODE); , LERR_(INVALID_TIMECODE));
} }

View file

@ -582,7 +582,7 @@ namespace time {
{ {
if (n == 0) if (n == 0)
throw error::Logic ("Degenerated frame grid not allowed" throw error::Logic ("Degenerated frame grid not allowed"
, error::LUMIERA_ERROR_BOTTOM_VALUE); , error::LERR_(BOTTOM_VALUE));
return n; return n;
} }
}//(End) implementation helpers }//(End) implementation helpers

View file

@ -312,7 +312,7 @@ namespace lib {
throw error::Logic("Variant type mismatch: " throw error::Logic("Variant type mismatch: "
"the given variant record does not hold " "the given variant record does not hold "
"a value of the type requested here" "a value of the type requested here"
,error::LUMIERA_ERROR_WRONG_TYPE); ,error::LERR_(WRONG_TYPE));
else else
return *buff; return *buff;
} }

View file

@ -58,7 +58,7 @@ namespace wrapper {
using util::unConst; using util::unConst;
using util::isSameObject; using util::isSameObject;
using lib::meta::_Fun; using lib::meta::_Fun;
using lumiera::error::LUMIERA_ERROR_BOTTOM_VALUE; using lumiera::error::LERR_(BOTTOM_VALUE);
using std::function; using std::function;
@ -272,7 +272,7 @@ namespace wrapper {
{ {
if (!created_) if (!created_)
throw lumiera::error::State ("accessing uninitialised value/ref wrapper" throw lumiera::error::State ("accessing uninitialised value/ref wrapper"
, LUMIERA_ERROR_BOTTOM_VALUE); , LERR_(BOTTOM_VALUE));
return access(); return access();
} }
@ -339,7 +339,7 @@ namespace wrapper {
{ {
if (!content_) if (!content_)
throw lumiera::error::State ("accessing uninitialised reference wrapper" throw lumiera::error::State ("accessing uninitialised reference wrapper"
, LUMIERA_ERROR_BOTTOM_VALUE); , LERR_(BOTTOM_VALUE));
return *content_; return *content_;
} }

View file

@ -242,7 +242,7 @@ namespace asset {
"(multichannel) media. Found parent Media %s.") "(multichannel) media. Found parent Media %s.")
% mediaref % mediaref
% *mediaref.checkCompound() % *mediaref.checkCompound()
,LUMIERA_ERROR_PART_OF_COMPOUND); ,LERR_(PART_OF_COMPOUND));
Clip* pC = new Clip (mediaref); Clip* pC = new Clip (mediaref);
return AssetManager::instance().wrap (*pC); return AssetManager::instance().wrap (*pC);
} }

View file

@ -70,7 +70,7 @@ namespace asset {
using util::isnil; using util::isnil;
using util::contains; using util::contains;
using lumiera::Query; using lumiera::Query;
using lumiera::query::LUMIERA_ERROR_CAPABILITY_QUERY; using lumiera::query::LERR_(CAPABILITY_QUERY);
using lib::query::extractID; using lib::query::extractID;
using proc::mobject::Session; using proc::mobject::Session;

View file

@ -70,7 +70,7 @@ namespace asset {
UnknownID (ID<Asset> aID) UnknownID (ID<Asset> aID)
: IDErr(_Fmt("Query for Asset with ID=%d, which up to now " : IDErr(_Fmt("Query for Asset with ID=%d, which up to now "
"hasn't been created or encountered.") % aID "hasn't been created or encountered.") % aID
,LUMIERA_ERROR_UNKNOWN_ASSET_ID) ,LERR_(UNKNOWN_ASSET_ID))
{ } { }
}; };
@ -80,7 +80,7 @@ namespace asset {
: IDErr (_Fmt("Request for Asset(%s), specifying an Asset kind, " : IDErr (_Fmt("Request for Asset(%s), specifying an Asset kind, "
"that doesn't match the actual type (and can't be " "that doesn't match the actual type (and can't be "
"casted either).") % idi "casted either).") % idi
,LUMIERA_ERROR_WRONG_ASSET_KIND) ,LERR_(WRONG_ASSET_KIND))
{ } { }
}; };

View file

@ -80,7 +80,7 @@ namespace control {
{ {
if (!clo) if (!clo)
throw lumiera::error::State ("Lifecycle error: function arguments not ready", throw lumiera::error::State ("Lifecycle error: function arguments not ready",
LUMIERA_ERROR_UNBOUND_ARGUMENTS); LERR_(UNBOUND_ARGUMENTS));
clo.invoke (func_); clo.invoke (func_);
} }
@ -138,7 +138,7 @@ namespace control {
{ {
if (!clo) if (!clo)
throw lumiera::error::State ("need additional function arguments to be able to capture UNDO state", throw lumiera::error::State ("need additional function arguments to be able to capture UNDO state",
LUMIERA_ERROR_UNBOUND_ARGUMENTS); LERR_(UNBOUND_ARGUMENTS));
captureMemento_(clo); captureMemento_(clo);
return *this; return *this;

View file

@ -76,7 +76,7 @@ namespace control {
if (not cmd.canExec()) if (not cmd.canExec())
throw error::Logic(_Fmt("Reject '%s'. Not suitably prepared for invocation: %s") throw error::Logic(_Fmt("Reject '%s'. Not suitably prepared for invocation: %s")
% cmd.getID() % cmd % cmd.getID() % cmd
, LUMIERA_ERROR_UNBOUND_ARGUMENTS); , LERR_(UNBOUND_ARGUMENTS));
lib::IterQueue<Command>::feed (move(cmd)); lib::IterQueue<Command>::feed (move(cmd));
return *this; return *this;

View file

@ -122,7 +122,7 @@ namespace control {
{ {
if (not definitionBlock) if (not definitionBlock)
throw error::Invalid ("unbound function/closure provided for CommandSetup" throw error::Invalid ("unbound function/closure provided for CommandSetup"
, error::LUMIERA_ERROR_BOTTOM_VALUE); , error::LERR_(BOTTOM_VALUE));
pendingCmdDefinitions().emplace_front (cmdID_, move(definitionBlock)); pendingCmdDefinitions().emplace_front (cmdID_, move(definitionBlock));
return *this; return *this;
@ -189,7 +189,7 @@ namespace control {
"is currently open for parametrisation and " "is currently open for parametrisation and "
"not yet dispatched for execution."} "not yet dispatched for execution."}
% instanceID % invocationID % instanceID % invocationID
, LUMIERA_ERROR_DUPLICATE_COMMAND , LERR_(DUPLICATE_COMMAND)
); );
// create new clone from the prototype // create new clone from the prototype
table_[instanceID] = move (Command::get(prototypeID).newInstance()); table_[instanceID] = move (Command::get(prototypeID).newInstance());
@ -219,7 +219,7 @@ namespace control {
if (not entry->second) if (not entry->second)
throw error::Logic (_Fmt{"Command instance '%s' is not (yet/anymore) active"} throw error::Logic (_Fmt{"Command instance '%s' is not (yet/anymore) active"}
% instanceID % instanceID
, error::LUMIERA_ERROR_LIFECYCLE); , error::LERR_(LIFECYCLE));
return entry->second; return entry->second;
} }
@ -241,11 +241,11 @@ namespace control {
"globally registered command definition, " "globally registered command definition, "
"nor to an previously opened command instance") "nor to an previously opened command instance")
% instanceID % instanceID
, LUMIERA_ERROR_INVALID_COMMAND); , LERR_(INVALID_COMMAND));
if (not entry->second.isValid()) if (not entry->second.isValid())
throw error::Logic (_Fmt{"Command instance '%s' is not (yet/anymore) active"} throw error::Logic (_Fmt{"Command instance '%s' is not (yet/anymore) active"}
% instanceID % instanceID
, error::LUMIERA_ERROR_LIFECYCLE); , error::LERR_(LIFECYCLE));
if (not must_be_bound or entry->second.canExec()) if (not must_be_bound or entry->second.canExec())
instance = move(entry->second); instance = move(entry->second);
} }
@ -253,7 +253,7 @@ namespace control {
throw error::State (_Fmt{"attempt to dispatch command instance '%s' " throw error::State (_Fmt{"attempt to dispatch command instance '%s' "
"without binding all arguments properly beforehand"} "without binding all arguments properly beforehand"}
% instanceID % instanceID
, LUMIERA_ERROR_UNBOUND_ARGUMENTS); , LERR_(UNBOUND_ARGUMENTS));
ENSURE (instance.isValid() and ENSURE (instance.isValid() and
(instance.canExec() or not must_be_bound)); (instance.canExec() or not must_be_bound));

View file

@ -138,7 +138,7 @@ namespace control {
if (!isValid()) if (!isValid())
throw lumiera::error::State ("Lifecycle error: can't bind functor, " throw lumiera::error::State ("Lifecycle error: can't bind functor, "
"command arguments not yet provided", "command arguments not yet provided",
LUMIERA_ERROR_UNBOUND_ARGUMENTS); LERR_(UNBOUND_ARGUMENTS));
arguments_->invoke(func); arguments_->invoke(func);
} }

View file

@ -145,7 +145,7 @@ namespace control {
if (!isValid()) if (!isValid())
throw lumiera::error::State ("Lifecycle error: can't bind functor, " throw lumiera::error::State ("Lifecycle error: can't bind functor, "
"command arguments not yet provided", "command arguments not yet provided",
LUMIERA_ERROR_UNBOUND_ARGUMENTS); LERR_(UNBOUND_ARGUMENTS));
arguments_->invoke(func); arguments_->invoke(func);
} }

View file

@ -80,7 +80,7 @@ namespace control {
REQUIRE (handle); REQUIRE (handle);
if (!handle->isValid()) if (!handle->isValid())
throw error::Invalid (operation_descr+" an undefined command" throw error::Invalid (operation_descr+" an undefined command"
, LUMIERA_ERROR_INVALID_COMMAND); , LERR_(INVALID_COMMAND));
} }
void void
@ -89,7 +89,7 @@ namespace control {
REQUIRE (handle); REQUIRE (handle);
if (!handle->canExec()) if (!handle->canExec())
throw error::State ("Lifecycle error: command arguments not bound" throw error::State ("Lifecycle error: command arguments not bound"
, LUMIERA_ERROR_UNBOUND_ARGUMENTS); , LERR_(UNBOUND_ARGUMENTS));
} }
void void
@ -98,7 +98,7 @@ namespace control {
REQUIRE (handle); REQUIRE (handle);
if (!handle->canUndo()) if (!handle->canUndo())
throw error::State ("Lifecycle error: command has not yet captured UNDO information" throw error::State ("Lifecycle error: command has not yet captured UNDO information"
, LUMIERA_ERROR_UNBOUND_ARGUMENTS); , LERR_(UNBOUND_ARGUMENTS));
} }
} }
@ -129,7 +129,7 @@ namespace control {
Command cmd = CommandRegistry::instance().queryIndex (cmdID); Command cmd = CommandRegistry::instance().queryIndex (cmdID);
if (!cmd) if (!cmd)
throw error::Invalid(_Fmt("Command \"%s\" not found") % cmdID throw error::Invalid(_Fmt("Command \"%s\" not found") % cmdID
, LUMIERA_ERROR_INVALID_COMMAND); , LERR_(INVALID_COMMAND));
ENSURE (cmdID == CommandRegistry::instance().findDefinition(cmd)); ENSURE (cmdID == CommandRegistry::instance().findDefinition(cmd));
return cmd; return cmd;
@ -240,7 +240,7 @@ namespace control {
"ID \"%s\" is already in use") "ID \"%s\" is already in use")
% *this % *this
% newCmdID % newCmdID
, LUMIERA_ERROR_DUPLICATE_COMMAND); , LERR_(DUPLICATE_COMMAND));
} }

View file

@ -178,7 +178,7 @@ namespace control {
{ {
if (!isCaptured_) if (!isCaptured_)
throw lumiera::error::State ("need to invoke memento state capturing beforehand", throw lumiera::error::State ("need to invoke memento state capturing beforehand",
LUMIERA_ERROR_MISSING_MEMENTO); LERR_(MISSING_MEMENTO));
return memento_; return memento_;
} }

View file

@ -126,8 +126,8 @@ namespace engine {
namespace metadata { namespace metadata {
using error::LUMIERA_ERROR_LIFECYCLE; using error::LERR_(LIFECYCLE);
using error::LUMIERA_ERROR_BOTTOM_VALUE; using error::LERR_(BOTTOM_VALUE);
namespace { // details of hash calculation namespace { // details of hash calculation
template<typename VAL> template<typename VAL>
@ -242,7 +242,7 @@ namespace engine {
{ {
if (nontrivial(this->instanceFunc_)) if (nontrivial(this->instanceFunc_))
throw error::Logic ("unable to supersede an already attached TypeHandler" throw error::Logic ("unable to supersede an already attached TypeHandler"
, LUMIERA_ERROR_LIFECYCLE); , LERR_(LIFECYCLE));
instanceFunc_ = ref.instanceFunc_; instanceFunc_ = ref.instanceFunc_;
} }
@ -399,7 +399,7 @@ namespace engine {
if (NIL == state_) if (NIL == state_)
throw error::Fatal ("Buffer metadata entry with state==NIL encountered." throw error::Fatal ("Buffer metadata entry with state==NIL encountered."
"State transition logic broken (programming error)" "State transition logic broken (programming error)"
, LUMIERA_ERROR_LIFECYCLE); , LERR_(LIFECYCLE));
} }
void void
@ -409,7 +409,7 @@ namespace engine {
throw error::Logic ("Buffer is inaccessible (marked as free). " throw error::Logic ("Buffer is inaccessible (marked as free). "
"Need a new buffer pointer in order to lock an entry. " "Need a new buffer pointer in order to lock an entry. "
"You should invoke markLocked(buffer) prior to access." "You should invoke markLocked(buffer) prior to access."
, LUMIERA_ERROR_LIFECYCLE ); , LERR_(LIFECYCLE));
} }
void void
@ -417,7 +417,7 @@ namespace engine {
{ {
if (FREE != state_) if (FREE != state_)
throw error::Logic ("Buffer already in use" throw error::Logic ("Buffer already in use"
, LUMIERA_ERROR_LIFECYCLE ); , LERR_(LIFECYCLE));
REQUIRE (!buffer_, "Buffer marked as free, " REQUIRE (!buffer_, "Buffer marked as free, "
"but buffer pointer is set."); "but buffer pointer is set.");
} }

View file

@ -211,7 +211,7 @@ namespace engine {
REQUIRE (!metaEntry.isTypeKey()); REQUIRE (!metaEntry.isTypeKey());
if (!metaEntry.isLocked()) if (!metaEntry.isLocked())
throw error::Logic ("unable to attach an object because buffer isn't locked for use" throw error::Logic ("unable to attach an object because buffer isn't locked for use"
, LUMIERA_ERROR_LIFECYCLE); , LERR_(LIFECYCLE));
metaEntry.useTypeHandlerFrom (refEntry); // EX_STRONG metaEntry.useTypeHandlerFrom (refEntry); // EX_STRONG
} }
@ -307,8 +307,7 @@ namespace engine {
BuffHandle::takeOwnershipFor(BufferDescriptor const& type) BuffHandle::takeOwnershipFor(BufferDescriptor const& type)
{ {
if (!this->isValid()) if (!this->isValid())
throw error::Logic ("attaching an object requires an buffer in locked state" throw error::Logic ("attaching an object requires an buffer in locked state", LERR_(LIFECYCLE));
, LUMIERA_ERROR_LIFECYCLE);
if (this->size() < type.determineBufferSize()) if (this->size() < type.determineBufferSize())
throw error::Logic ("insufficient buffer size to hold an instance of that type"); throw error::Logic ("insufficient buffer size to hold an instance of that type");

View file

@ -120,7 +120,7 @@ namespace engine {
{ {
if (!pBuffer_) if (!pBuffer_)
throw error::Logic ("buffer not (yet) locked for access by clients" throw error::Logic ("buffer not (yet) locked for access by clients"
, LUMIERA_ERROR_LIFECYCLE); , LERR_(LIFECYCLE));
return *reinterpret_cast<BU*> (pBuffer_); return *reinterpret_cast<BU*> (pBuffer_);
} }

View file

@ -60,7 +60,7 @@ namespace proc {
namespace engine { namespace engine {
namespace error = lumiera::error; namespace error = lumiera::error;
using error::LUMIERA_ERROR_LIFECYCLE; using error::LERR_(LIFECYCLE);
using lib::HashVal; using lib::HashVal;

View file

@ -45,7 +45,7 @@ namespace proc {
namespace engine { namespace engine {
namespace error = lumiera::error; namespace error = lumiera::error;
using error::LUMIERA_ERROR_LIFECYCLE; using error::LERR_(LIFECYCLE);
using lib::HashVal; using lib::HashVal;

View file

@ -109,7 +109,7 @@ namespace mobject {
{ {
if (!smPtr_) if (!smPtr_)
throw error::State("Lifecycle error: MObject ref not activated" throw error::State("Lifecycle error: MObject ref not activated"
,LUMIERA_ERROR_BOTTOM_MOBJECTREF); , LERR_(BOTTOM_MOBJECTREF));
ENSURE (INSTANCEOF (MO, smPtr_.get())); ENSURE (INSTANCEOF (MO, smPtr_.get()));
return smPtr_.operator-> (); return smPtr_.operator-> ();
@ -120,7 +120,7 @@ namespace mobject {
{ {
if (!isValid()) if (!isValid())
throw error::State("Accessing inactive MObject ref" throw error::State("Accessing inactive MObject ref"
,LUMIERA_ERROR_BOTTOM_MOBJECTREF); , LERR_(BOTTOM_MOBJECTREF));
ENSURE (INSTANCEOF (MO, smPtr_.get())); ENSURE (INSTANCEOF (MO, smPtr_.get()));
return *pRef_; return *pRef_;
@ -167,7 +167,7 @@ namespace mobject {
{ {
if (!isValid()) if (!isValid())
throw error::State("Attempt to attach a child to an inactive MObject ref" throw error::State("Attempt to attach a child to an inactive MObject ref"
, LUMIERA_ERROR_BOTTOM_MOBJECTREF); , LERR_(BOTTOM_MOBJECTREF));
MORef<MOX> newInstance; MORef<MOX> newInstance;
PlacementMO::ID thisScope = pRef_; PlacementMO::ID thisScope = pRef_;
return newInstance.activate ( return newInstance.activate (

View file

@ -218,7 +218,7 @@ namespace mobject {
{ {
if (not isValid()) if (not isValid())
throw error::Logic ("attempt to resolve an unconnected output mapping" throw error::Logic ("attempt to resolve an unconnected output mapping"
, error::LUMIERA_ERROR_UNCONNECTED); , error::LERR_(UNCONNECTED));
return resolve(); return resolve();
} }

View file

@ -271,14 +271,14 @@ namespace proc {
{ {
if (!placementID) if (!placementID)
throw error::Logic ("Attempt to access a NIL PlacementRef" throw error::Logic ("Attempt to access a NIL PlacementRef"
,LUMIERA_ERROR_BOTTOM_PLACEMENTREF); , LERR_(BOTTOM_PLACEMENTREF));
Placement<MObject> & genericPlacement (session::SessionServiceFetch::resolveID (placementID)); // may throw Placement<MObject> & genericPlacement (session::SessionServiceFetch::resolveID (placementID)); // may throw
REQUIRE (genericPlacement.isValid()); REQUIRE (genericPlacement.isValid());
if (!(genericPlacement.template isCompatible<MX>())) if (!(genericPlacement.template isCompatible<MX>()))
throw error::Invalid("actual type of the resolved placement is incompatible" throw error::Invalid("actual type of the resolved placement is incompatible"
, LUMIERA_ERROR_INVALID_PLACEMENTREF); , LERR_(INVALID_PLACEMENTREF));
////////////////////////TODO: 1. better message, including type? ////////////////////////TODO: 1. better message, including type?
////////////////////////TODO: 2. define a separate error-ID for the type mismatch! ////////////////////////TODO: 2. define a separate error-ID for the type mismatch!

View file

@ -515,7 +515,7 @@ namespace session {
if (!contains (targetScope)) if (!contains (targetScope))
throw error::Logic ("Specified a non-registered Placement as scope " throw error::Logic ("Specified a non-registered Placement as scope "
"while adding another Placement to the index" "while adding another Placement to the index"
,LUMIERA_ERROR_INVALID_SCOPE); ////////////////TICKET #197 ,LERR_(INVALID_SCOPE)); ////////////////TICKET #197
return pTab_->addEntry(newObj, targetScope); return pTab_->addEntry(newObj, targetScope);
} }

View file

@ -266,7 +266,7 @@ namespace session {
"while the actual type of the pointee (MObject) " "while the actual type of the pointee (MObject) "
"registered within the index isn't compatible with the " "registered within the index isn't compatible with the "
"requested specific MObject subclass" "requested specific MObject subclass"
,LUMIERA_ERROR_PLACEMENT_TYPE); , LERR_(PLACEMENT_TYPE));
} }
inline void inline void
@ -274,10 +274,10 @@ namespace session {
{ {
if (!id) if (!id)
throw lumiera::error::Logic ("Encountered a NIL Placement-ID marker" throw lumiera::error::Logic ("Encountered a NIL Placement-ID marker"
,LUMIERA_ERROR_BOTTOM_PLACEMENTREF); , LERR_(BOTTOM_PLACEMENTREF));
if (!idx.contains (id)) if (!idx.contains (id))
throw lumiera::error::Invalid ("Accessing Placement not registered within the index" throw lumiera::error::Invalid ("Accessing Placement not registered within the index"
,LUMIERA_ERROR_NOT_IN_SESSION); ///////////////////////TICKET #197 , LERR_(NOT_IN_SESSION)); ///////////////////////TICKET #197
} }
}//(End) shortcuts }//(End) shortcuts

View file

@ -71,7 +71,7 @@ namespace session {
REQUIRE (path); REQUIRE (path);
if (path->empty()) if (path->empty())
throw error::Logic (operation_descr+" an empty placement scope path" throw error::Logic (operation_descr+" an empty placement scope path"
, LUMIERA_ERROR_EMPTY_SCOPE_PATH); , LERR_(EMPTY_SCOPE_PATH));
} }
}//(End) helpers }//(End) helpers
@ -319,7 +319,7 @@ namespace session {
___check_notBottom (this, "Navigating"); ___check_notBottom (this, "Navigating");
if (!target.isValid()) if (!target.isValid())
throw error::Invalid ("can't navigate to a target scope outside the model" throw error::Invalid ("can't navigate to a target scope outside the model"
, LUMIERA_ERROR_INVALID_SCOPE); , LERR_(INVALID_SCOPE));
std::vector<Scope> otherPath; std::vector<Scope> otherPath;
append_all (discoverScopePath(target), otherPath); append_all (discoverScopePath(target), otherPath);

View file

@ -215,7 +215,7 @@ namespace session {
{ {
if (isRoot()) if (isRoot())
throw lumiera::error::Invalid ("can't get parent of root scope" throw lumiera::error::Invalid ("can't get parent of root scope"
, LUMIERA_ERROR_NO_PARENT_SCOPE); , LERR_(NO_PARENT_SCOPE));
return SessionServiceExploreScope::getScope (*anchor_); return SessionServiceExploreScope::getScope (*anchor_);
} }

View file

@ -58,7 +58,7 @@ namespace session {
// return theGlobalRegistry(); // return theGlobalRegistry();
// //
// throw error::State ("global model port registry is not accessible" // throw error::State ("global model port registry is not accessible"
// , LUMIERA_ERROR_BUILDER_LIFECYCLE); // , LERR_(BUILDER_LIFECYCLE));
//} //}

View file

@ -79,7 +79,7 @@ namespace session {
{ {
ERROR (progress, "Unrecoverable Failure while creating the empty default session."); ERROR (progress, "Unrecoverable Failure while creating the empty default session.");
throw lumiera::error::Fatal ( "Failure while creating the basic session object. System halted." throw lumiera::error::Fatal ( "Failure while creating the basic session object. System halted."
, LUMIERA_ERROR_CREATE_SESSION ); , LERR_(CREATE_SESSION));
} }

View file

@ -120,7 +120,7 @@ namespace session {
{ {
if (Scope(placement).isRoot()) if (Scope(placement).isRoot())
throw error::Invalid ("Can't detach the model root." throw error::Invalid ("Can't detach the model root."
, LUMIERA_ERROR_INVALID_SCOPE); , LERR_(INVALID_SCOPE));
QueryFocus currentFocus; QueryFocus currentFocus;
currentFocus.shift (Scope(placement).getParent()); currentFocus.shift (Scope(placement).getParent());

View file

@ -78,7 +78,7 @@ namespace play {
OutputSlot& slot = outputResolver_->getOutputFor (port); OutputSlot& slot = outputResolver_->getOutputFor (port);
if (!slot.isFree()) if (!slot.isFree())
throw error::State("unable to acquire a suitable output slot" /////////////////////TICKET #197 #816 throw error::State("unable to acquire a suitable output slot" /////////////////////TICKET #197 #816
, LUMIERA_ERROR_CANT_PLAY); , LERR_(CANT_PLAY));
return slot; return slot;
} }

View file

@ -14,7 +14,7 @@ out: intermediate handler caught: LUMIERA_ERROR_EXTERNAL:failure in external ser
out: caught lumiera::Error: LUMIERA_ERROR_STATE:unforeseen state -- caused by: LUMIERA_ERROR_EXTERNAL:failure in external service \(test-7\). out: caught lumiera::Error: LUMIERA_ERROR_STATE:unforeseen state -- caused by: LUMIERA_ERROR_EXTERNAL:failure in external service \(test-7\).
out: intermediate handler caught: LUMIERA_ERROR_EXTERNAL:failure in external service \(test-8\).....will rethrow as error::State out: intermediate handler caught: LUMIERA_ERROR_EXTERNAL:failure in external service \(test-8\).....will rethrow as error::State
out: 2nd intermediate handler caught: LUMIERA_ERROR_STATE:unforeseen state -- caused by: LUMIERA_ERROR_EXTERNAL:failure in external service \(test-8\).....will rethrow as error::Config out: 2nd intermediate handler caught: LUMIERA_ERROR_STATE:unforeseen state -- caused by: LUMIERA_ERROR_EXTERNAL:failure in external service \(test-8\).....will rethrow as error::Config
out: caught lumiera::Error: LUMIERA_ERROR_CONFIG:misconfiguration -- caused by: LUMIERA_ERROR_EXTERNAL:failure in external service \(test-8\)\. out: caught error::Invalid: LUMIERA_ERROR_CONFIG:misconfiguration -- caused by: LUMIERA_ERROR_EXTERNAL:failure in external service \(test-8\)\.
out: caught lumiera::Error: LUMIERA_ERROR_LIFE_AND_UNIVERSE:and everything\? \(what is the answer\?\)\. out: caught lumiera::Error: LUMIERA_ERROR_LIFE_AND_UNIVERSE:and everything\? \(what is the answer\?\)\.
out: caught error::Logic: LUMIERA_ERROR_LOGIC:internal logic broken \(the big bang\). -- caused by: LUMIERA_ERROR_LIFE_AND_UNIVERSE:and everything\? \(what is the answer\?\)\. out: caught error::Logic: LUMIERA_ERROR_LOGIC:internal logic broken \(the big bang\). -- caused by: LUMIERA_ERROR_LIFE_AND_UNIVERSE:and everything\? \(what is the answer\?\)\.
return: 0 return: 0

View file

@ -69,7 +69,7 @@ TEST (create_nowrite)
{ {
lumiera_fileheader header = lumiera_fileheader_create (file, "TEST", 0, sizeof (lumiera_fileheader), NULL); lumiera_fileheader header = lumiera_fileheader_create (file, "TEST", 0, sizeof (lumiera_fileheader), NULL);
CHECK(lumiera_error() == LUMIERA_ERROR_FILEHEADER_NOWRITE); CHECK (lumiera_error() == LUMIERA_ERROR_FILEHEADER_NOWRITE);
lumiera_fileheader_close (&header, LUMIERA_FILEHEADER_FLAG_CLEAN); lumiera_fileheader_close (&header, LUMIERA_FILEHEADER_FLAG_CLEAN);
} }
@ -91,8 +91,8 @@ TEST (acquire_wrongheader)
sizeof (lumiera_fileheader), sizeof (lumiera_fileheader),
LUMIERA_FILEHEADER_FLAG_CLEAN, LUMIERA_FILEHEADER_FLAG_CLEAN); LUMIERA_FILEHEADER_FLAG_CLEAN, LUMIERA_FILEHEADER_FLAG_CLEAN);
CHECK(!header.header); CHECK (!header.header);
CHECK(lumiera_error() == LUMIERA_ERROR_FILEHEADER_HEADER); CHECK (lumiera_error() == LUMIERA_ERROR_FILEHEADER_HEADER);
lumiera_fileheader_close (&header, LUMIERA_FILEHEADER_FLAG_CLEAN); lumiera_fileheader_close (&header, LUMIERA_FILEHEADER_FLAG_CLEAN);
} }
@ -114,8 +114,8 @@ TEST (acquire_basic)
sizeof (lumiera_fileheader), sizeof (lumiera_fileheader),
LUMIERA_FILEHEADER_FLAG_CLEAN, LUMIERA_FILEHEADER_FLAG_CLEAN); LUMIERA_FILEHEADER_FLAG_CLEAN, LUMIERA_FILEHEADER_FLAG_CLEAN);
CHECK(header.header); CHECK (header.header);
CHECK(!lumiera_error()); CHECK (!lumiera_error());
CHECK (lumiera_fileheader_version (&header) == 0); CHECK (lumiera_fileheader_version (&header) == 0);
@ -141,8 +141,8 @@ TEST (acquire_basic_readonly)
sizeof (lumiera_fileheader), sizeof (lumiera_fileheader),
LUMIERA_FILEHEADER_FLAG_CLEAN, NULL); LUMIERA_FILEHEADER_FLAG_CLEAN, NULL);
CHECK(header.header); CHECK (header.header);
CHECK(!lumiera_error()); CHECK (!lumiera_error());
CHECK (lumiera_fileheader_version (&header) == 0); CHECK (lumiera_fileheader_version (&header) == 0);

View file

@ -34,7 +34,6 @@ using test::Test;
namespace backend { namespace backend {
namespace test { namespace test {
using lumiera::error::LUMIERA_ERROR_LOGIC;
namespace { namespace {
class TestThread class TestThread

View file

@ -72,8 +72,8 @@ namespace test{
}; };
} }
using error::LUMIERA_ERROR_LIFECYCLE; using error::LERR_(LIFECYCLE);
using error::LUMIERA_ERROR_FATAL; using error::LERR_(FATAL);

View file

@ -56,7 +56,7 @@ namespace test{
} // (End) test setup.... } // (End) test setup....
using backend::ThreadJoinable; using backend::ThreadJoinable;
using error::LUMIERA_ERROR_LOGIC; using error::LERR_(LOGIC);
using std::rand; using std::rand;

View file

@ -47,7 +47,7 @@ using std::string;
namespace lib { namespace lib {
namespace test{ namespace test{
using lumiera::error::LUMIERA_ERROR_LIFECYCLE; using lumiera::error::LERR_(LIFECYCLE);
/** /**
* Target object to be instantiated as Singleton * Target object to be instantiated as Singleton

View file

@ -34,7 +34,7 @@
#include <cstdlib> #include <cstdlib>
using lumiera::error::LUMIERA_ERROR_ASSERTION; using lumiera::error::LERR_(ASSERTION);
using util::isSameObject; using util::isSameObject;
using util::typeStr; using util::typeStr;
using std::rand; using std::rand;

View file

@ -57,7 +57,7 @@ namespace test{
using proc::asset::meta::TimeGrid; using proc::asset::meta::TimeGrid;
using lib::meta::Types; using lib::meta::Types;
using lib::meta::InstantiateChainedCombinations; using lib::meta::InstantiateChainedCombinations;
using error::LUMIERA_ERROR_UNCONNECTED; using error::LERR_(UNCONNECTED);

View file

@ -42,7 +42,7 @@ namespace time{
namespace test{ namespace test{
using proc::asset::meta::TimeGrid; using proc::asset::meta::TimeGrid;
using format::LUMIERA_ERROR_INVALID_TIMECODE; using format::LERR_(INVALID_TIMECODE);
namespace { // Helper for writing test cases namespace { // Helper for writing test cases

View file

@ -38,7 +38,7 @@ using boost::lexical_cast;
using util::isnil; using util::isnil;
using std::string; using std::string;
using lumiera::error::LUMIERA_ERROR_BOTTOM_VALUE; using lumiera::error::LERR_(BOTTOM_VALUE);
namespace lib { namespace lib {
namespace time{ namespace time{

View file

@ -80,8 +80,8 @@ namespace test {
/** marker for simulated failure exceptions */ /** marker for simulated failure exceptions */
LUMIERA_ERROR_DEFINE( TEST, "simulated failure."); LUMIERA_ERROR_DEFINE( TEST, "simulated failure.");
using error::LUMIERA_ERROR_LOGIC; using error::LERR_(LOGIC);
using error::LUMIERA_ERROR_STATE; using error::LERR_(STATE);
@ -137,7 +137,7 @@ namespace test {
return true; return true;
else else
if ("throw"==startSpec) //---starting flounders if ("throw"==startSpec) //---starting flounders
throw error::Fatal("simulated failure to start the subsystem", LUMIERA_ERROR_TEST); throw error::Fatal("simulated failure to start the subsystem", LERR_(TEST));
return started_; return started_;
} }
@ -200,7 +200,7 @@ namespace test {
if ("true" ==runSpec) termination(0); // signal regular termination if ("true" ==runSpec) termination(0); // signal regular termination
if ("throw"==runSpec) if ("throw"==runSpec)
{ {
Error problemIndicator("simulated Problem terminating subsystem",LUMIERA_ERROR_TEST); Error problemIndicator("simulated Problem terminating subsystem",LERR_(TEST));
lumiera_error(); // reset error state.... lumiera_error(); // reset error state....
// Note: in real life this actually // Note: in real life this actually
// would be an catched exception! // would be an catched exception!

View file

@ -54,7 +54,7 @@ namespace lib {
namespace idi { namespace idi {
namespace test{ namespace test{
using lumiera::error::LUMIERA_ERROR_WRONG_TYPE; using lumiera::error::LERR_(WRONG_TYPE);
namespace { // Test definitions... namespace { // Test definitions...

View file

@ -50,7 +50,7 @@ namespace test {
using std::move; using std::move;
using std::rand; using std::rand;
using lumiera::error::LUMIERA_ERROR_LIFECYCLE; using lumiera::error::LERR_(LIFECYCLE);

View file

@ -62,7 +62,7 @@ namespace test {
using util::contains; using util::contains;
using lumiera::error::LUMIERA_ERROR_EXTERNAL; using lumiera::error::LERR_(EXTERNAL);
/** diagnostics: checks if the given value has been written /** diagnostics: checks if the given value has been written

View file

@ -44,8 +44,8 @@ namespace metadata{
namespace test { namespace test {
using lumiera::error::LUMIERA_ERROR_INVALID; using lumiera::error::LERR_(INVALID);
using lumiera::error::LUMIERA_ERROR_LIFECYCLE; using lumiera::error::LERR_(LIFECYCLE);
namespace { // Test fixture namespace { // Test fixture

View file

@ -47,9 +47,9 @@ namespace proc {
namespace engine{ namespace engine{
namespace test { namespace test {
using lumiera::error::LUMIERA_ERROR_FATAL; using lumiera::error::LERR_(FATAL);
using lumiera::error::LUMIERA_ERROR_INVALID; using lumiera::error::LERR_(INVALID);
using lumiera::error::LUMIERA_ERROR_LIFECYCLE; using lumiera::error::LERR_(LIFECYCLE);
namespace { // Test fixture namespace { // Test fixture

View file

@ -46,8 +46,8 @@ namespace test {
using lib::test::Dummy; using lib::test::Dummy;
using proc::engine::BuffHandle; using proc::engine::BuffHandle;
using error::LUMIERA_ERROR_LOGIC; using error::LERR_(LOGIC);
using error::LUMIERA_ERROR_LIFECYCLE; using error::LERR_(LIFECYCLE);
namespace { // Test fixture namespace { // Test fixture

View file

@ -42,7 +42,7 @@ namespace test {
using util::isnil; using util::isnil;
using util::isSameObject; using util::isSameObject;
using lumiera::error::LUMIERA_ERROR_INVALID; using lumiera::error::LERR_(INVALID);
/***********************************************************************//** /***********************************************************************//**

View file

@ -46,8 +46,8 @@ namespace test {
using util::isnil; using util::isnil;
using util::isSameObject; using util::isSameObject;
using lumiera::error::LUMIERA_ERROR_LOGIC; using lumiera::error::LERR_(LOGIC);
using lumiera::error::LUMIERA_ERROR_INVALID; using lumiera::error::LERR_(INVALID);

View file

@ -84,7 +84,7 @@ namespace gui {
namespace model{ namespace model{
namespace test { namespace test {
using lumiera::error::LUMIERA_ERROR_WRONG_TYPE; using lumiera::error::LERR_(WRONG_TYPE);
using ID = lib::idi::BareEntryID const&; using ID = lib::idi::BareEntryID const&;
namespace { // test fixture... namespace { // test fixture...

View file

@ -50,8 +50,8 @@ namespace gui {
namespace interact { namespace interact {
namespace test { namespace test {
using lumiera::error::LUMIERA_ERROR_INVALID; using lumiera::error::LERR_(INVALID);
using lumiera::error::LUMIERA_ERROR_STATE; using lumiera::error::LERR_(STATE);

View file

@ -45,8 +45,8 @@ namespace gui {
namespace interact { namespace interact {
namespace test { namespace test {
using lumiera::error::LUMIERA_ERROR_INDEX_BOUNDS; using lumiera::error::LERR_(INDEX_BOUNDS);
using lumiera::error::LUMIERA_ERROR_LOGIC; using lumiera::error::LERR_(LOGIC);

View file

@ -52,8 +52,8 @@ namespace lib {
namespace diff{ namespace diff{
namespace test{ namespace test{
using error::LUMIERA_ERROR_WRONG_TYPE; using error::LERR_(WRONG_TYPE);
using error::LUMIERA_ERROR_BOTTOM_VALUE; using error::LERR_(BOTTOM_VALUE);
namespace {//Test fixture.... namespace {//Test fixture....

View file

@ -47,9 +47,9 @@ namespace lib {
namespace diff{ namespace diff{
namespace test{ namespace test{
using lumiera::error::LUMIERA_ERROR_INVALID; using lumiera::error::LERR_(INVALID);
using lumiera::error::LUMIERA_ERROR_INDEX_BOUNDS; using lumiera::error::LERR_(INDEX_BOUNDS);
using lumiera::error::LUMIERA_ERROR_BOTTOM_VALUE; using lumiera::error::LERR_(BOTTOM_VALUE);
namespace {//Test fixture.... namespace {//Test fixture....

View file

@ -37,7 +37,7 @@
#include <string> #include <string>
#include <vector> #include <vector>
using lumiera::error::LUMIERA_ERROR_ITER_EXHAUST; using lumiera::error::LERR_(ITER_EXHAUST);
using lib::iter_stl::IterSnapshot; using lib::iter_stl::IterSnapshot;
using lib::iter_stl::snapshot; using lib::iter_stl::snapshot;
using lib::time::Time; using lib::time::Time;

View file

@ -55,7 +55,7 @@ namespace lib {
namespace diff{ namespace diff{
namespace test{ namespace test{
using lumiera::error::LUMIERA_ERROR_LOGIC; using lumiera::error::LERR_(LOGIC);
namespace {//Test fixture.... namespace {//Test fixture....

View file

@ -44,7 +44,7 @@ namespace lib {
namespace test{ namespace test{
using ::Test; using ::Test;
using lumiera::error::LUMIERA_ERROR_ITER_EXHAUST; using lumiera::error::LERR_(ITER_EXHAUST);
using boost::lexical_cast; using boost::lexical_cast;
using util::for_each; using util::for_each;
using util::isnil; using util::isnil;

View file

@ -44,7 +44,7 @@ namespace test{
using util::isnil; using util::isnil;
using std::vector; using std::vector;
using lumiera::error::LUMIERA_ERROR_ITER_EXHAUST; using lumiera::error::LERR_(ITER_EXHAUST);
namespace { // test fixture namespace { // test fixture

View file

@ -76,7 +76,7 @@ namespace test{
using util::isSameObject; using util::isSameObject;
using lib::iter_stl::eachElm; using lib::iter_stl::eachElm;
using lib::iter_explorer::ChainedIters; using lib::iter_explorer::ChainedIters;
using lumiera::error::LUMIERA_ERROR_ITER_EXHAUST; using lumiera::error::LERR_(ITER_EXHAUST);
using std::string; using std::string;

View file

@ -39,7 +39,7 @@ namespace test{
using ::Test; using ::Test;
using util::isnil; using util::isnil;
using lumiera::error::LUMIERA_ERROR_ITER_EXHAUST; using lumiera::error::LERR_(ITER_EXHAUST);

View file

@ -58,7 +58,7 @@ namespace test{
using std::list; using std::list;
using std::rand; using std::rand;
using lumiera::error::LUMIERA_ERROR_ITER_EXHAUST; using lumiera::error::LERR_(ITER_EXHAUST);
using iter_source::eachEntry; using iter_source::eachEntry;
using iter_source::transform; using iter_source::transform;

View file

@ -39,7 +39,7 @@ namespace test{
using ::Test; using ::Test;
using util::isnil; using util::isnil;
using lumiera::error::LUMIERA_ERROR_ITER_EXHAUST; using lumiera::error::LERR_(ITER_EXHAUST);

View file

@ -80,7 +80,7 @@ namespace test{
using util::isnil; using util::isnil;
using util::isSameObject; using util::isSameObject;
using lib::iter_stl::eachElm; using lib::iter_stl::eachElm;
using lumiera::error::LUMIERA_ERROR_ITER_EXHAUST; using lumiera::error::LERR_(ITER_EXHAUST);
using std::vector; using std::vector;
using std::string; using std::string;

View file

@ -50,7 +50,7 @@ namespace test{
using std::vector; using std::vector;
using std::rand; using std::rand;
using lumiera::error::LUMIERA_ERROR_ITER_EXHAUST; using lumiera::error::LERR_(ITER_EXHAUST);

View file

@ -46,7 +46,7 @@ namespace test{
using util::isnil; using util::isnil;
using util::isSameObject; using util::isSameObject;
using lumiera::error::LUMIERA_ERROR_ITER_EXHAUST; using lumiera::error::LERR_(ITER_EXHAUST);
namespace { // test data... namespace { // test data...
@ -80,7 +80,7 @@ namespace test{
, next(0) , next(0)
{ {
if (i == exception_trigger) if (i == exception_trigger)
throw error::Fatal("simulated error", LUMIERA_ERROR_PROVOKED_FAILURE); throw error::Fatal("simulated error", LERR_(PROVOKED_FAILURE));
} }
}; };

View file

@ -41,8 +41,8 @@ using std::ostream;
using util::isSameObject; using util::isSameObject;
using lumiera::error::LUMIERA_ERROR_BOTTOM_VALUE; using lumiera::error::LERR_(BOTTOM_VALUE);
using lumiera::error::LUMIERA_ERROR_WRONG_TYPE; using lumiera::error::LERR_(WRONG_TYPE);
namespace util { namespace util {

View file

@ -47,7 +47,7 @@ using lib::time::Duration;
using lib::time::Time; using lib::time::Time;
using lib::hash::LuidH; using lib::hash::LuidH;
using lumiera::error::LUMIERA_ERROR_WRONG_TYPE; using lumiera::error::LERR_(WRONG_TYPE);
using std::string; using std::string;
using std::tuple; using std::tuple;

View file

@ -41,8 +41,8 @@ using util::_Fmt;
using util::isnil; using util::isnil;
using std::string; using std::string;
using lumiera::error::LUMIERA_ERROR_LOGIC; using lumiera::error::LERR_(LOGIC);
using lumiera::error::LUMIERA_ERROR_WRONG_TYPE; using lumiera::error::LERR_(WRONG_TYPE);
namespace lib { namespace lib {
@ -222,7 +222,7 @@ namespace test {
if (!impl) if (!impl)
throw error::Logic("virtual copy works only on instances " throw error::Logic("virtual copy works only on instances "
"of the same concrete implementation class" "of the same concrete implementation class"
,error::LUMIERA_ERROR_WRONG_TYPE); ,error::LERR_(WRONG_TYPE));
else else
return *impl; return *impl;
} }

View file

@ -46,7 +46,7 @@ namespace test{
using std::ostream; using std::ostream;
using std::string; using std::string;
using lumiera::error::LUMIERA_ERROR_INVALID; using lumiera::error::LERR_(INVALID);
namespace { // hierarchy of test dummy objects namespace { // hierarchy of test dummy objects

View file

@ -43,9 +43,9 @@ namespace test{
using util::isnil; using util::isnil;
using util::for_each; using util::for_each;
using util::isSameObject; using util::isSameObject;
using error::LUMIERA_ERROR_BOTTOM_VALUE; using error::LERR_(BOTTOM_VALUE);
using error::LUMIERA_ERROR_WRONG_TYPE; using error::LERR_(WRONG_TYPE);
using error::LUMIERA_ERROR_ASSERTION; using error::LERR_(ASSERTION);
using std::vector; using std::vector;
using std::cout; using std::cout;

View file

@ -44,8 +44,8 @@ using util::join;
namespace lib { namespace lib {
namespace test { namespace test {
using lumiera::error::LUMIERA_ERROR_INDEX_BOUNDS; using lumiera::error::LERR_(INDEX_BOUNDS);
using lumiera::error::LUMIERA_ERROR_INVALID; using lumiera::error::LERR_(INVALID);
using ParrT = lib::PathArray<5>; using ParrT = lib::PathArray<5>;

View file

@ -91,7 +91,7 @@ namespace test{
using util::isnil; using util::isnil;
using lumiera::error::LUMIERA_ERROR_ITER_EXHAUST; using lumiera::error::LERR_(ITER_EXHAUST);
typedef ScopedCollection<Dummy, sizeof(SubDummy)> CollD; typedef ScopedCollection<Dummy, sizeof(SubDummy)> CollD;