Better errors

This commit is contained in:
NeeEoo
2024-02-12 11:55:36 +01:00
parent e6ff26fd2e
commit 2da4b8a111
5 changed files with 20 additions and 5 deletions
+3 -2
View File
@@ -91,8 +91,9 @@ class HScript extends Script {
}
private function _errorHandler(error:Error) {
// This should be ${error.file} later
var fileName = error.origin;
if(remappedNames.exists(fileName))
fileName = remappedNames.get(fileName);
var fn = '$fileName:${error.line}: ';
var err = error.toString();
if (err.startsWith(fn)) err = err.substr(fn.length);