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_
|
#ifndef DAWNNATIVE_ERRORDATA_H_
|
||||||
#define DAWNNATIVE_ERRORDATA_H_
|
#define DAWNNATIVE_ERRORDATA_H_
|
||||||
|
|
||||||
|
#include "common/Compiler.h"
|
||||||
|
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
@ -31,13 +33,13 @@ namespace dawn {
|
||||||
namespace dawn_native {
|
namespace dawn_native {
|
||||||
enum class InternalErrorType : uint32_t;
|
enum class InternalErrorType : uint32_t;
|
||||||
|
|
||||||
class ErrorData {
|
class DAWN_NO_DISCARD ErrorData {
|
||||||
public:
|
public:
|
||||||
static std::unique_ptr<ErrorData> Create(InternalErrorType type,
|
static DAWN_NO_DISCARD std::unique_ptr<ErrorData> Create(InternalErrorType type,
|
||||||
std::string message,
|
std::string message,
|
||||||
const char* file,
|
const char* file,
|
||||||
const char* function,
|
const char* function,
|
||||||
int line);
|
int line);
|
||||||
ErrorData(InternalErrorType type, std::string message);
|
ErrorData(InternalErrorType type, std::string message);
|
||||||
|
|
||||||
struct BacktraceRecord {
|
struct BacktraceRecord {
|
||||||
|
|
Loading…
Reference in New Issue