OSDN Git Service

ファイル作成関数作成中
[nlite/nlite.git] / nlite / nlite_exception.cpp
1 #include "stdafx.h"
2 #include "nlite_include.h"
3
4 namespace nlite{
5
6 Exception::Exception(){}
7
8 Exception::Exception(const char* const& errMessage):exception(errMessage){}
9
10 Exception::Exception(const wchar_t * const & errMessage,UINT_PTR in_line,LPCTSTR in_fileName,LPCTSTR in_function):
11         wErrMessage(errMessage),
12         line(in_line),
13         function(in_function)
14 {
15         WCHAR file[_MAX_FNAME];
16         WCHAR ext[_MAX_EXT];
17         _wsplitpath(in_fileName,(wchar_t*)NULL,(wchar_t*)NULL,file,ext);
18         fileName = file;
19         fileName += ext;
20
21 }
22
23 LPCTSTR Exception::what(){
24
25         return wErrMessage;
26
27 }
28
29 UINT_PTR Exception::getLineNo(){
30
31         return line;
32 }
33
34 LPCTSTR Exception::getFileName(){
35                         
36         return fileName;
37                 
38 }
39
40 LPCTSTR Exception::getFunctionName(){
41
42         return function;
43 }
44
45
46 AppInitException::AppInitException(UINT_PTR in_line,LPCTSTR in_fileName,LPCTSTR in_function):Exception(TEXT("\83A\83v\83\8a\83P\81[\83V\83\87\83\93\8f\89\8aú\89»\82É\8e¸\94s\82µ\82Ü\82µ\82½"),in_line,in_fileName,in_function){}
47
48
49
50 NLIBException::NLIBException(LPCTSTR errmessage,NLIB_RESULT rslt,UINT_PTR in_line,LPCTSTR in_fileName,LPCTSTR in_function):errcode(rslt),Exception(errmessage,in_line,in_fileName,in_function){}
51
52 NLiveException::NLiveException(LPCTSTR errmessage,UINT_PTR in_line,LPCTSTR in_fileName,LPCTSTR in_function):Exception(errmessage,in_line,in_fileName,in_function){}
53
54 }