mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-21 10:49:14 +00:00
Rename DeviceErrorCallback to ErrorCallback and add ErrorType arg
This same callback will be used for push/pop error scope. Bug: dawn:153 Change-Id: I2771539e13f8a4e6a59f13c8082689d25ba44905 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/10460 Commit-Queue: Austin Eng <enga@chromium.org> Reviewed-by: Kai Ninomiya <kainino@chromium.org>
This commit is contained in:
committed by
Commit Bot service account
parent
5603dc9044
commit
cb0cb658d4
@@ -19,14 +19,18 @@
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
namespace dawn {
|
||||
enum class ErrorType : uint32_t;
|
||||
}
|
||||
|
||||
namespace dawn_native {
|
||||
|
||||
enum class ErrorType : uint32_t;
|
||||
enum class InternalErrorType : uint32_t;
|
||||
|
||||
class ErrorData {
|
||||
public:
|
||||
ErrorData();
|
||||
ErrorData(ErrorType type, std::string message);
|
||||
ErrorData(InternalErrorType type, std::string message);
|
||||
|
||||
struct BacktraceRecord {
|
||||
const char* file;
|
||||
@@ -35,12 +39,13 @@ namespace dawn_native {
|
||||
};
|
||||
void AppendBacktrace(const char* file, const char* function, int line);
|
||||
|
||||
ErrorType GetType() const;
|
||||
InternalErrorType GetInternalType() const;
|
||||
dawn::ErrorType GetType() const;
|
||||
const std::string& GetMessage() const;
|
||||
const std::vector<BacktraceRecord>& GetBacktrace() const;
|
||||
|
||||
private:
|
||||
ErrorType mType;
|
||||
InternalErrorType mType;
|
||||
std::string mMessage;
|
||||
std::vector<BacktraceRecord> mBacktrace;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user