C

<platforminterface/error.h> - Error reporting

Provides functions to report errors. More...

Header: #include <platforminterface/error.h>

Functions

void error(unsigned int lineNumber, QulError code, int param1 = 0, int param2 = 0, int param3 = 0)
QulErrorHandler *setErrorHandler(QulErrorHandler *handler)

Macros

QUL_ASSERT(expression, code, ...)

Detailed Description

This header file contains all the functions for error reporting. These functions are used by the Qt Quick Ultralite library and can also be used to report custom errors.

Function Documentation

[since Qt Quick Ultralite (Platform) 2.2] void error(unsigned int lineNumber, QulError code, int param1 = 0, int param2 = 0, int param3 = 0)

Reports error message to default or custom handler.

The default error handler prints error code, lineNumber, and additional param1, param2, and param3 to Qul::Platform::PlatformContext::consoleWrite.

The default handler halts the program after printing the error message, and enters an infinite loop to save the backtrace for debugging.

Calls the custom error handler if it has been set using Qul::setErrorHandler.

This function was introduced in Qt Quick Ultralite (Platform) 2.2.

See also Error handling, Qt Quick Ultralite error codes, and QUL_ASSERT.

[since Qt Quick Ultralite (Platform) 2.2] QulErrorHandler *setErrorHandler(QulErrorHandler *handler)

Set error handler to handler.

Passing nullptr as an argument will restore default error handling.

Returns a pointer to the previous error handler. nullptr is returned when the default error handler is in use.

Called by Qul::setErrorHandler

This function was introduced in Qt Quick Ultralite (Platform) 2.2.

See also Error handling.

Macro Documentation

[since Qt Quick Ultralite (Platform) 2.2] QUL_ASSERT(expression, code, ...)

Evaluate assertion.

Calls Qul::PlatformInterface::error with code and optional parameters if the expression evaluates to a false statement.

The variable argument part of the macro may contain up to three integer arguments to provide additional information in case the assertion fails.

This macro was introduced in Qt Quick Ultralite (Platform) 2.2.

See also Qul::PlatformInterface::error and Error handling.

Available under certain Qt licenses.
Find out more.