Add DAWN_NO_DISCARD to ErrorData
ErrorData should not be discarded. The error must be handled. Bug: chromium:1063810 Change-Id: I55e782e499f307b91790db10a42878afdc7540dd Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/17501 Commit-Queue: Austin Eng <enga@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
This commit is contained in:
parent
4c6c40d47d
commit
b867e14cac
|
@ -15,6 +15,8 @@
|
|||
#ifndef DAWNNATIVE_ERRORDATA_H_
|
||||
#define DAWNNATIVE_ERRORDATA_H_
|
||||
|
||||
#include "common/Compiler.h"
|
||||
|
||||
#include <cstdint>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
@ -31,13 +33,13 @@ namespace dawn {
|
|||
namespace dawn_native {
|
||||
enum class InternalErrorType : uint32_t;
|
||||
|
||||
class ErrorData {
|
||||
class DAWN_NO_DISCARD ErrorData {
|
||||
public:
|
||||
static std::unique_ptr<ErrorData> Create(InternalErrorType type,
|
||||
std::string message,
|
||||
const char* file,
|
||||
const char* function,
|
||||
int line);
|
||||
static DAWN_NO_DISCARD std::unique_ptr<ErrorData> Create(InternalErrorType type,
|
||||
std::string message,
|
||||
const char* file,
|
||||
const char* function,
|
||||
int line);
|
||||
ErrorData(InternalErrorType type, std::string message);
|
||||
|
||||
struct BacktraceRecord {
|
||||
|
|
Loading…
Reference in New Issue