Fix wrong error key in ReflectNodes (#1694)

This commit is contained in:
Islon Scherer
2026-06-25 09:21:03 +02:00
committed by GitHub
parent f61a5cf541
commit d42e199da3
@@ -1,5 +1,5 @@
/*
* Copyright © 2024 Apple Inc. and the Pkl project authors. All rights reserved.
* Copyright © 2024-2026 Apple Inc. and the Pkl project authors. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -32,7 +32,10 @@ public final class ReflectNodes {
@TruffleBoundary
protected VmTyped eval(VmTyped self, VmTyped module) {
if (!module.isModuleObject()) {
throw exceptionBuilder().evalError("expectedModule").withLocation(getArg1Node()).build();
throw exceptionBuilder()
.evalError("expectedModuleAsArgument")
.withLocation(getArg1Node())
.build();
}
return module.getModuleMirror();
}