but still not bothering to throw the error

This commit is contained in:
Ben Fry
2015-05-12 09:31:18 -04:00
parent 5bdf76fb7f
commit 919f7b7028
3 changed files with 7 additions and 6 deletions

View File

@@ -343,7 +343,7 @@ editor.status.missing.closing_curly_bracket = Missing closing curly bracket "}"
editor.status.missing.add = Consider adding "%s"
editor.status.reserved_words = "color" and "int" are reserved words & cannot be used as variable names
# methoddef, varname, classname, namefield, typeA, typeB will be replaced with the correct value during runtime (don't translate)
editor.status.undefined_method = The function %s does not exist
editor.status.undefined_method = The function "%s(%s)" does not exist
editor.status.empty_param = The function "%s()" does not expect any parameters
editor.status.wrong_param = The function "%s()" expects parameters like: "%s(%s)"
editor.status.undef_global_var = The global variable "%s" does not exist

View File

@@ -166,10 +166,9 @@ public class ErrorMessageSimplifier {
case IProblem.UndefinedMethod:
if (args.length > 2) {
result = Language.text("editor.status.undefined_method");
String methodDef = "\"" + args[args.length - 2] + "("
+ removePackagePrefixes (args[args.length - 1]) + ")\"";
result = result.replace("methoddef", methodDef);
String methodName = args[args.length - 2];
String methodArgs = removePackagePrefixes(args[args.length - 1]);
result = Language.interpolate("editor.status.undefined_method", methodName, methodArgs);
}
break;

View File

@@ -10,8 +10,10 @@ X Change "method" to "function" in a few error messages
X https://github.com/processing/processing/issues/3225
X ErrorMessageSimplifier should use the language subst stuff
o also, shouldn't that be one text() method with different args?
X Debugger "String is null" error when hitting breakpoint
_ https://github.com/processing/processing/issues/3265
X Error message for incorrect function arguments is wonky
X https://github.com/processing/processing/issues/3268
_ https://github.com/processing/processing/issues/3268
contribs
X Window size not passing into Tweak Mode