Base: Add PropertyError exception

This commit is contained in:
marioalexis
2024-08-01 13:01:19 -03:00
parent 5f657bc1ce
commit fd5eb34d6a
6 changed files with 45 additions and 1 deletions

View File

@@ -670,6 +670,26 @@ public:
PyObject* getPyExceptionType() const override;
};
/**
* The PropertyError can be used to indicate the usage of a wrong property name or value.
* @author Mario Passaglia
*/
class BaseExport PropertyError: public AttributeError
{
public:
/// Construction
PropertyError();
explicit PropertyError(const char* sMessage);
explicit PropertyError(const std::string& sMessage);
PropertyError(const PropertyError&) = default;
PropertyError(PropertyError&&) = default;
/// Destruction
~PropertyError() noexcept override = default;
PropertyError& operator=(const PropertyError&) = default;
PropertyError& operator=(PropertyError&&) = default;
PyObject* getPyExceptionType() const override;
};
/**
* The RuntimeError can be used to indicate an unknown exception at runtime.
* @author Werner Mayer