absence_thelab

diff src/3deng/exceptions.cpp @ 0:1cffe3409164

initial commit
author John Tsiombikas <nuclear@member.fsf.org>
date Thu, 23 Oct 2014 01:46:07 +0300
parents
children
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/src/3deng/exceptions.cpp	Thu Oct 23 01:46:07 2014 +0300
     1.3 @@ -0,0 +1,44 @@
     1.4 +#include "exceptions.h"
     1.5 +
     1.6 +EngineInitException::EngineInitException() {
     1.7 +	str = "Unknown";
     1.8 +}
     1.9 +
    1.10 +EngineInitException::EngineInitException(string reason) {
    1.11 +	str = reason;
    1.12 +}
    1.13 +
    1.14 +string EngineInitException::GetReason() const {
    1.15 +	string tmp = "An error occured while initializing the 3D Engine\nReason: ";
    1.16 +	tmp += str;
    1.17 +	return tmp;
    1.18 +}
    1.19 +
    1.20 +EngineModuleNotFoundException::EngineModuleNotFoundException() {
    1.21 +	str = "Unknown Module";
    1.22 +}
    1.23 +
    1.24 +EngineModuleNotFoundException::EngineModuleNotFoundException(string modulename) {
    1.25 +	str = modulename;
    1.26 +}
    1.27 +
    1.28 +string EngineModuleNotFoundException::GetReason() const {
    1.29 +	string tmp = "The 3D Engine could not link a required module.\n";
    1.30 +	tmp += "Please contact the program ventor to obtain the missing file.\nMissing File: ";
    1.31 +	tmp += str;
    1.32 +	return tmp;
    1.33 +}
    1.34 +
    1.35 +EngineGeneralException::EngineGeneralException() {
    1.36 +	str = "Unknown";
    1.37 +}
    1.38 +
    1.39 +EngineGeneralException::EngineGeneralException(string reason) {
    1.40 +	str = reason;
    1.41 +}
    1.42 +
    1.43 +string EngineGeneralException::GetReason() const {
    1.44 +	string tmp = "An error occured in the 3D Engine\nReason: ";
    1.45 +	tmp += str;
    1.46 +	return tmp;
    1.47 +}