Skip to content

Commit cd264f9

Browse files
committed
Update __cast__ CastException message
1 parent c4e337f commit cd264f9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/com/laytonsmith/core/functions/Compiler.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1244,7 +1244,7 @@ public Mixed exec(Target t, Environment env, Mixed... args) throws ConfigRuntime
12441244
CClassType type = ArgumentValidation.getClassType(args[1], t);
12451245
if(!InstanceofUtil.isInstanceof(value, type, env)) {
12461246
throw new CRECastException(
1247-
"Cannot cast " + value.typeof().getName() + " to " + type.getName() + ".", t);
1247+
"Cannot cast from " + value.typeof().getSimpleName() + " to " + type.getSimpleName() + ".", t);
12481248
}
12491249
// TODO - Perform runtime conversion to 'type' when necessary (cross-cast handling).
12501250
return value;

0 commit comments

Comments
 (0)