#ifndef LIBANGLE_ERROR_H_
#define LIBANGLE_ERROR_H_
#include <EGL/egl.h>
#include <EGL/eglext.h>
#include "angle_gl.h"
#include "common/angleutils.h"
#include "common/debug.h"
#include <memory>
#include <ostream>
#include <string>
namespace angle
{
template <typename ErrorT, typename ErrorBaseT, ErrorBaseT NoErrorVal, typename CodeT, CodeT EnumT>
class ErrorStreamBase : angle::NonCopyable
{ … };
}
namespace egl
{
class Error;
}
namespace egl
{
class [[nodiscard]] Error final
{ … };
namespace priv
{
ErrorStream;
}
EglBadAccess;
EglBadAlloc;
EglBadAttribute;
EglBadConfig;
EglBadContext;
EglBadCurrentSurface;
EglBadDevice;
EglBadDisplay;
EglBadMatch;
EglBadNativeWindow;
EglBadNativePixmap;
EglBadParameter;
EglBadState;
EglBadStream;
EglBadSurface;
EglContextLost;
EglNotInitialized;
inline Error NoError()
{ … }
}
#define ANGLE_CONCAT1 …
#define ANGLE_CONCAT2 …
#define ANGLE_LOCAL_VAR …
#define ANGLE_TRY_TEMPLATE(EXPR, FUNC) …
#define ANGLE_RETURN(X) …
#define ANGLE_TRY(EXPR) …
#define ANGLE_SWALLOW_ERR(EXPR) …
#undef ANGLE_LOCAL_VAR
#undef ANGLE_CONCAT2
#undef ANGLE_CONCAT1
#define ANGLE_CHECK(CONTEXT, EXPR, MESSAGE, ERROR) …
namespace angle
{
enum class [[nodiscard]] Result
{ … };
egl::Error ResultToEGL(Result result);
}
inline bool IsError(angle::Result result)
{ … }
inline bool IsError(const egl::Error &err)
{ … }
inline bool IsError(bool value)
{ … }
#define ANGLE_HANDLE_VALIDATION_ERR(X) …
#define ANGLE_VALIDATION_TRY(EXPR) …
#include "Error.inc"
#endif