diff options
author | James Cook <james@lindenlab.com> | 2007-01-02 08:33:20 +0000 |
---|---|---|
committer | James Cook <james@lindenlab.com> | 2007-01-02 08:33:20 +0000 |
commit | 420b91db29485df39fd6e724e782c449158811cb (patch) | |
tree | b471a94563af914d3ed3edd3e856d21cb1b69945 /indra/llcommon/llerror.cpp |
Print done when done.
Diffstat (limited to 'indra/llcommon/llerror.cpp')
-rw-r--r-- | indra/llcommon/llerror.cpp | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/indra/llcommon/llerror.cpp b/indra/llcommon/llerror.cpp new file mode 100644 index 0000000000..9f643fd9eb --- /dev/null +++ b/indra/llcommon/llerror.cpp @@ -0,0 +1,40 @@ +/** + * @file llerror.cpp + * @brief Function to crash. + * + * Copyright (c) 2001-$CurrentYear$, Linden Research, Inc. + * $License$ + */ +#include "linden_common.h" + +#include "llerror.h" + +LLErrorBuffer gErrorBuffer; +LLErrorStream gErrorStream(&gErrorBuffer); + + +void _llcrash_and_loop() +{ + // Now, we go kaboom! + U32* crash = NULL; + + *crash = 0; + + while(TRUE) + { + + // Loop forever, in case the crash didn't work? + } +} + +LLScopedErrorLevel::LLScopedErrorLevel(LLErrorBuffer::ELevel error_level) +{ + mOrigErrorLevel = gErrorStream.getErrorLevel(); + gErrorStream.setErrorLevel(error_level); +} + + +LLScopedErrorLevel::~LLScopedErrorLevel() +{ + gErrorStream.setErrorLevel(mOrigErrorLevel); +} |