swf/include/IError.h

28 lines
650 B
C++

#pragma once
/////////////////////////////////////////////////////
// @file: IError.h
// @brief: Error handling interface
// @author: dyz
// @date: 2025-04-19
// @version: 1.0
/////////////////////////////////////////////////////
#include "SWFInc.h"
namespace WF {
class SWF_API IError
{
public:
virtual ~IError() = default;
// Get the error code
virtual int GetErrorCode() const = 0;
// Get the error message
virtual const char* GetErrorMessage() const = 0;
// Set the error code and message
virtual void SetError(int code, const char* message) = 0;
};
} // namespace WF