changed error reporting function interface

This commit is contained in:
Francesco Cozzuto
2023-01-20 01:22:20 +01:00
parent 9cc7121cd9
commit 0980cc193d
29 changed files with 391 additions and 437 deletions
+4 -4
View File
@@ -11,7 +11,7 @@ static int bin_new(Runtime *runtime, Object **argv, unsigned int argc, Object *r
if(!Object_IsInt(argv[0]))
{
Error_Report(error, 0, "Argument is not an int");
Error_Report(error, ErrorType_RUNTIME, "Argument is not an int");
return -1;
}
@@ -33,13 +33,13 @@ static int bin_sliceUp(Runtime *runtime, Object **argv, unsigned int argc, Objec
if(!Object_IsInt(argv[1]))
{
Error_Report(error, 0, "Argument 1 is not an int");
Error_Report(error, ErrorType_RUNTIME, "Argument 1 is not an int");
return -1;
}
if(!Object_IsInt(argv[2]))
{
Error_Report(error, 0, "Argument 2 is not an int");
Error_Report(error, ErrorType_RUNTIME, "Argument 2 is not an int");
return -1;
}
@@ -78,7 +78,7 @@ static int bin_toString(Runtime *runtime, Object **argv, unsigned int argc, Obje
if(!Object_IsBuffer(argv[0]))
{
Error_Report(error, 0, "Argument is not a buffer");
Error_Report(error, ErrorType_RUNTIME, "Argument is not a buffer");
return -1;
}