Added custom Exception HazelnuppValueNotConvertibleException

This commit is contained in:
Leonetienne
2021-06-02 22:27:51 +02:00
parent dbc02fab2e
commit 83285a297a
11 changed files with 49 additions and 37 deletions

View File

@@ -1,4 +1,5 @@
#include "ListValue.h"
#include "HazelnuppException.h"
#include <sstream>
ListValue::ListValue() :
@@ -65,27 +66,27 @@ ListValue::operator std::vector<Value*>() const
long long int ListValue::GetInt64() const
{
throw std::bad_cast();
throw HazelnuppValueNotConvertibleException();
}
int ListValue::GetInt32() const
{
throw std::bad_cast();
throw HazelnuppValueNotConvertibleException();
}
long double ListValue::GetFloat64() const
{
throw std::bad_cast();
throw HazelnuppValueNotConvertibleException();
}
double ListValue::GetFloat32() const
{
throw std::bad_cast();
throw HazelnuppValueNotConvertibleException();
}
std::string ListValue::GetString() const
{
throw std::bad_cast();
throw HazelnuppValueNotConvertibleException();
}
const std::vector<Value*>& ListValue::GetList() const