mirror of
https://onedev.site.tesses.net/tesses-framework
synced 2026-02-09 00:05:46 +00:00
Remove SDL2
This commit is contained in:
@@ -203,7 +203,7 @@ namespace Tesses::Framework::Serialization::Json
|
||||
}
|
||||
if((v & 0xFC00) != 0xDC00)
|
||||
{
|
||||
throw TextException("Not a lower utf-16 surrogate pair.");
|
||||
throw std::runtime_error("Not a lower utf-16 surrogate pair.");
|
||||
}
|
||||
|
||||
|
||||
@@ -214,7 +214,7 @@ namespace Tesses::Framework::Serialization::Json
|
||||
else
|
||||
{
|
||||
|
||||
throw TextException("Could not read lower utf-16 surrogate pair.");
|
||||
throw std::runtime_error("Could not read lower utf-16 surrogate pair.");
|
||||
}
|
||||
if(v2 <= 0x7F)
|
||||
{
|
||||
@@ -297,7 +297,7 @@ namespace Tesses::Framework::Serialization::Json
|
||||
size_t tokenIndex=0;
|
||||
|
||||
std::function<std::pair<std::string,bool>()> pop_token=[&tokens,&tokenIndex]()->std::pair<std::string,bool> {
|
||||
if(tokenIndex >= tokens.size()) throw TextException("Json tokens out of bounds.");
|
||||
if(tokenIndex >= tokens.size()) throw std::runtime_error("Json tokens out of bounds.");
|
||||
return tokens[tokenIndex++];
|
||||
};
|
||||
|
||||
@@ -324,7 +324,7 @@ namespace Tesses::Framework::Serialization::Json
|
||||
tkn = pop_token();
|
||||
if(tkn.second || tkn.first != ":")
|
||||
{
|
||||
throw TextException("Invalid JSON key value seperator.");
|
||||
throw std::runtime_error("Invalid JSON key value seperator.");
|
||||
}
|
||||
|
||||
auto value = read_token();
|
||||
@@ -341,7 +341,7 @@ namespace Tesses::Framework::Serialization::Json
|
||||
else
|
||||
{
|
||||
|
||||
throw TextException("Invalid JSON object.");
|
||||
throw std::runtime_error("Invalid JSON object.");
|
||||
}
|
||||
}
|
||||
return obj;
|
||||
|
||||
@@ -27,7 +27,7 @@ namespace Tesses::Framework::Serialization {
|
||||
if(rc)
|
||||
{
|
||||
std::string error = sqlite3_errmsg(sqlite);
|
||||
throw TextException(error);
|
||||
throw std::runtime_error(error);
|
||||
}
|
||||
this->data = static_cast<void*>(sqlite);
|
||||
#endif
|
||||
@@ -54,7 +54,9 @@ namespace Tesses::Framework::Serialization {
|
||||
std::vector<std::vector<std::pair<std::string,std::optional<std::string>>>> SQLiteDatabase::Exec(std::string statement)
|
||||
{
|
||||
std::vector<std::vector<std::pair<std::string,std::optional<std::string>>>> items;
|
||||
|
||||
Exec(statement,items);
|
||||
|
||||
return items;
|
||||
}
|
||||
void SQLiteDatabase::Exec(std::string statement,std::vector<std::vector<std::pair<std::string,std::optional<std::string>>>>& items)
|
||||
@@ -67,7 +69,7 @@ namespace Tesses::Framework::Serialization {
|
||||
{
|
||||
std::string errstr = err == nullptr ? "" : err;
|
||||
sqlite3_free(err);
|
||||
throw TextException(errstr);
|
||||
throw std::runtime_error(errstr);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
@@ -77,4 +79,4 @@ namespace Tesses::Framework::Serialization {
|
||||
sqlite3_close(static_cast<sqlite3*>(this->data));
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user