mirror of
https://github.com/optiscaler/OptiScaler.git
synced 2026-08-28 09:07:11 +00:00
Make error show the name of the error instead of code
This commit is contained in:
@@ -1,6 +1,4 @@
|
||||
#include "log.h"
|
||||
#include <fstream>
|
||||
#include <format>
|
||||
|
||||
std::ostream null(nullptr);
|
||||
std::ostream* logStream = &null;
|
||||
@@ -31,7 +29,7 @@ NvAPI_Status Ok(const std::source_location& location) {
|
||||
}
|
||||
|
||||
NvAPI_Status Error(NvAPI_Status status, const std::source_location& location) {
|
||||
log(std::format("{}: {}", location.function_name(), std::to_string(status)));
|
||||
log(std::format("{}: {}", location.function_name(), fromErrorNr(status)));
|
||||
return status;
|
||||
}
|
||||
|
||||
|
||||
@@ -3,7 +3,10 @@
|
||||
#include <chrono>
|
||||
#include <cstdint>
|
||||
#include <string>
|
||||
#include <fstream>
|
||||
#include <format>
|
||||
#include <source_location>
|
||||
#include "util.h"
|
||||
#include "../include/nvapi.h"
|
||||
|
||||
std::string getCurrentTimeFormatted();
|
||||
|
||||
Reference in New Issue
Block a user