* @brief Checks a condition and logs an error message if the condition is * false. * @param[in] condition The condition to check. * @param[in] message The error message to log if the condition is false. * @param[in] file The source file where the check is performed. * @param[in] line The line number in the source file where the check is * performed. */
| 741 | * performed. |
| 742 | */ |
| 743 | inline void check(bool condition, const char *message, |
| 744 | const char *file = "unkown", int line = -1) { |
| 745 | if (!condition) { |
| 746 | LOG(kDefLog, kError, "Error in file %s line %d:\n%s", file, line, message); |
| 747 | } else { |
| 748 | LOG(kDefLog, kTrace, "Success in file %s line %d:\n%s", file, line, |
| 749 | message); |
| 750 | } |
| 751 | } |
| 752 | |
| 753 | /** |
| 754 | * @brief Factory function to create a GPU context, which aggregates WebGPU API |
no test coverage detected