Error (win32). More...
#include <kanzi/core/legacy/kzs_types.hpp>
Macros | |
#define | kzsWin32Assert(test) |
Asserts the given test parameter. More... | |
#define | kzsWin32ErrorThrow(new_error, logMessage) |
Return from the function with the given error code. More... | |
#define | kzsWin32ErrorTest(test, new_error, logMessage) |
Log system error message and return from the function with the given error code, if the test is false. More... | |
Enumerations | |
enum | KzsErrorDebugBreakType { KZS_ERROR_DEBUG_BREAK_TYPE_NEVER, KZS_ERROR_DEBUG_BREAK_TYPE_ALWAYS, KZS_ERROR_DEBUG_BREAK_TYPE_IF_DEBUGGER_PRESENT } |
This type controls whether debug break is called for errors and asserts. More... | |
enum | KzsErrorAssertType { KZS_ERROR_ASSERT_TYPE_EXIT, KZS_ERROR_ASSERT_TYPE_CRASH } |
This type controls how asserts are handled. More... | |
Functions | |
KANZI_API void | kzsErrorSetBreakType (enum KzsErrorDebugBreakType breakType) |
Sets error break type. More... | |
KANZI_API void | kzsErrorSetAssertType (enum KzsErrorAssertType assertType) |
Sets assert handling type. More... | |
KANZI_API void | kzsWin32ErrorNotify (kzU32 error) |
Logs system error message corresponding to given error number. More... | |
Error (win32).
Copyright 2008-2017 by Rightware. All rights reserved.
#define kzsWin32Assert | ( | test | ) |
Asserts the given test parameter.
If test evaluates to true, nothing happens. Only effective in debug build. Use only when the failing function reports errors using GetLastError(). Extends kzsAssert().
#define kzsWin32ErrorThrow | ( | new_error, | |
logMessage | |||
) |
Return from the function with the given error code.
Use only when the failing function reports errors using GetLastError(). Extends kzsErrorThrow().
#define kzsWin32ErrorTest | ( | test, | |
new_error, | |||
logMessage | |||
) |
Log system error message and return from the function with the given error code, if the test is false.
Otherwise continue. Use only when the failing function reports errors using GetLastError(). Extends kzsErrorTest().
This type controls whether debug break is called for errors and asserts.
enum KzsErrorAssertType |
KANZI_API void kzsErrorSetBreakType | ( | enum KzsErrorDebugBreakType | breakType | ) |
Sets error break type.
KANZI_API void kzsErrorSetAssertType | ( | enum KzsErrorAssertType | assertType | ) |
Sets assert handling type.