Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F110144565
skerror.cpp
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Thu, Apr 24, 22:03
Size
1 KB
Mime Type
text/x-c
Expires
Sat, Apr 26, 22:03 (2 d)
Engine
blob
Format
Raw Data
Handle
25699613
Attached To
rSYMKIT symkit
skerror.cpp
View Options
#include "skerror.h"
#include <ostream>
#include <iomanip>
using namespace std;
using namespace symkit;
SKError::SKError(const SKErrorType& type,
const std::string &functionName,
const std::string &className,
const std::string &comment,
bool fatal)
: type(type), functionName(functionName), className(className), comment(comment), fatal(fatal)
{
}
ostream& operator<<(ostream& os, const SKError &err)
{
os << "Error ";
switch (err.type)
{
case ERR_INIT:
os << "initializing symkit ";
break;
case ERR_EVOLVE:
os << "during scene evolution ";
break;
case ERR_RENDER:
os << "in rendering process ";
break;
case ERR_NULL_POINTER:
os << "caused by a NULL pointer dereferencing ";
break;
case ERR_NUMERICAL:
os << "caused by a wrong numerical operation ";
break;
case ERR_OTHERS:
os << "of unknown entity ";
break;
default:
os << "of unknown entity ";
break;
}
if (err.className != "")
os << "in class " << err.className << ", ";
os << ", " << "in function " << err.functionName << ": " << endl << endl;
os << setw(4) << err.comment << setw(1) << endl;
return os;
}
Event Timeline
Log In to Comment