|
Shinya Kitaoka |
810553 |
#pragma once
|
|
Shinya Kitaoka |
810553 |
|
|
Toshihiro Shimizu |
890ddd |
#ifndef igs_resource_msg_from_err_h
|
|
Toshihiro Shimizu |
890ddd |
#define igs_resource_msg_from_err_h
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
#include <string></string>
|
|
Toshihiro Shimizu |
890ddd |
#include "igs_os_type.h" /* windows.h... */
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
#define igs_tostr(n) igs_tostr_(n) /* __LINE__ --> 56 */
|
|
Shinya Kitaoka |
120a6e |
#define igs_tostr_(n) #n /* 56 --> "56" */
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
#ifndef IGS_RESOURCE_LOG_EXPORT
|
|
Toshihiro Shimizu |
890ddd |
#define IGS_RESOURCE_LOG_EXPORT
|
|
Toshihiro Shimizu |
890ddd |
#endif
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
/*------ エラーメッセージ表示 --------------------------------------*/
|
|
Shinya Kitaoka |
120a6e |
namespace igs {
|
|
Shinya Kitaoka |
120a6e |
namespace resource {
|
|
Toshihiro Shimizu |
890ddd |
const std::string msg_from_err_(/* 直によんではいけない */
|
|
Shinya Kitaoka |
120a6e |
const std::basic_string<tchar> &tit,</tchar>
|
|
Shinya Kitaoka |
120a6e |
const DWORD error_message_id,
|
|
Shinya Kitaoka |
120a6e |
const std::basic_string<tchar> &file,</tchar>
|
|
Shinya Kitaoka |
120a6e |
const std::basic_string<tchar> &line,</tchar>
|
|
Shinya Kitaoka |
120a6e |
const std::basic_string<tchar> &funcsig,</tchar>
|
|
Shinya Kitaoka |
120a6e |
const std::basic_string<tchar> &comp_type,</tchar>
|
|
Shinya Kitaoka |
120a6e |
const std::basic_string<tchar> &msc_full_ver,</tchar>
|
|
Shinya Kitaoka |
120a6e |
const std::basic_string<tchar> &date,</tchar>
|
|
Shinya Kitaoka |
120a6e |
const std::basic_string<tchar> &time);</tchar>
|
|
Toshihiro Shimizu |
890ddd |
}
|
|
Toshihiro Shimizu |
890ddd |
}
|
|
Toshihiro Shimizu |
890ddd |
/*--- ::GetLastError()値からエラーメッセージを得る ---*/
|
|
|
e280ae |
#ifdef _MSC_VER
|
|
shun-iwasawa |
5b7b9f |
#define igs_resource_msg_from_err(tit, error_message_id) \
|
|
shun-iwasawa |
5b7b9f |
igs::resource::msg_from_err_( \
|
|
shun-iwasawa |
5b7b9f |
tit, error_message_id, TEXT(__FILE__), TEXT(igs_tostr(__LINE__)), \
|
|
shun-iwasawa |
5b7b9f |
TEXT(__FUNCSIG__), TEXT(igs_tostr_(_MSC_VER)), \
|
|
shun-iwasawa |
5b7b9f |
TEXT(igs_tostr(_MSC_FULL_VER)), TEXT(__DATE__), TEXT(__TIME__))
|
|
shun-iwasawa |
5b7b9f |
/*--- エラーメッセージを得る ---*/
|
|
shun-iwasawa |
5b7b9f |
#define igs_resource_msg_from_er(tit) \
|
|
shun-iwasawa |
5b7b9f |
igs::resource::msg_from_err_( \
|
|
shun-iwasawa |
5b7b9f |
tit, NO_ERROR, TEXT(__FILE__), TEXT(igs_tostr(__LINE__)), \
|
|
shun-iwasawa |
5b7b9f |
TEXT(__FUNCSIG__), TEXT(igs_tostr_(_MSC_VER)), \
|
|
shun-iwasawa |
5b7b9f |
TEXT(igs_tostr(_MSC_FULL_VER)), TEXT(__DATE__), TEXT(__TIME__))
|
|
|
e280ae |
#else
|
|
shun-iwasawa |
5b7b9f |
#define igs_resource_msg_from_err(tit, error_message_id) \
|
|
shun-iwasawa |
5b7b9f |
igs::resource::msg_from_err_( \
|
|
shun-iwasawa |
5b7b9f |
tit, error_message_id, TEXT(__FILE__), TEXT(igs_tostr(__LINE__)), \
|
|
shun-iwasawa |
5b7b9f |
TEXT(__PRETTY_FUNCTION__), TEXT(__VERSION__), TEXT(__VERSION__), \
|
|
shun-iwasawa |
5b7b9f |
TEXT(__DATE__), TEXT(__TIME__))
|
|
shun-iwasawa |
5b7b9f |
/*--- エラーメッセージを得る ---*/
|
|
shun-iwasawa |
5b7b9f |
#define igs_resource_msg_from_er(tit) \
|
|
shun-iwasawa |
5b7b9f |
igs::resource::msg_from_err_( \
|
|
shun-iwasawa |
5b7b9f |
tit, NO_ERROR, TEXT(__FILE__), TEXT(igs_tostr(__LINE__)), \
|
|
shun-iwasawa |
5b7b9f |
TEXT(__PRETTY_FUNCTION__), TEXT(__VERSION__), TEXT(__VERSION__), \
|
|
shun-iwasawa |
5b7b9f |
TEXT(__DATE__), TEXT(__TIME__))
|
|
|
e280ae |
#endif
|
|
|
e280ae |
|
|
Toshihiro Shimizu |
890ddd |
#endif /* !igs_resource_msg_from_err_h */
|