Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions runtime-light/stdlib/diagnostics/error-handling-state.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,18 @@

struct ErrorHandlingState final : vk::not_copyable {
int64_t minimum_log_level{E_ALL};
const RuntimeContext& runtime_context{RuntimeContext::get()};

static constexpr std::string_view INI_ERROR_REPORTING_KEY = "error_reporting";
static constexpr int64_t SUPPORTED_ERROR_LEVELS = E_ERROR | E_WARNING | E_NOTICE;

ErrorHandlingState() noexcept;

bool log_level_enabled(int64_t level) const noexcept {
if (runtime_context.php_disable_warnings > 0 && (level & E_ERROR) == 0) {
// log level disabled by error control operator @
return false;
}
return (minimum_log_level & level) != 0;
}

Expand Down
Loading