mirror of
https://github.com/VCMP-SqMod/SqMod.git
synced 2026-11-06 11:57:09 +01:00
Add a helper function to obtain the last system error as a string and throw it.
This commit is contained in:
1 parent
4be562c926
commit
fe70560234
3 files changed
+57
No files matched your search
@@ -528,9 +528,11 @@ enum CmdError
|
||||
#if defined(_DEBUG) || defined(SQMOD_EXCEPTLOC)
|
||||
#define STHROW(e, m, ...) throw e(m " =>[" __FILE__ ":" SQMOD_STRINGIZEWRAP(__LINE__) "] ", ##__VA_ARGS__)
|
||||
#define STHROWF(m, ...) SqThrowF(m " =>[" __FILE__ ":" SQMOD_STRINGIZEWRAP(__LINE__) "] ", ##__VA_ARGS__)
|
||||
#define STHROWLASTF(m, ...) SqThrowLastF(m " =>[" __FILE__ ":" SQMOD_STRINGIZEWRAP(__LINE__) "] ", ##__VA_ARGS__)
|
||||
#else
|
||||
#define STHROW(e, m, ...) throw e(m, ##__VA_ARGS__)
|
||||
#define STHROWF(m, ...) SqThrowF(m, ##__VA_ARGS__)
|
||||
#define STHROWLASTF(m, ...) SqThrowLastF(m, ##__VA_ARGS__)
|
||||
#endif // _DEBUG
|
||||
|
||||
/* ------------------------------------------------------------------------------------------------
|
||||
|
||||
Reference in new issue
Block a user