summaryrefslogtreecommitdiff
path: root/indra/llcommon/llerror.cpp
blob: 9f643fd9eb93dbb2896e0c8838a364a39706c41c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
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);
}