Skip to content

Commit ac9fc1b

Browse files
committed
Throw 'ImportError' if loading of native code failed.
1 parent 0016e79 commit ac9fc1b

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/modules/ImpModuleBuiltins.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@
4141
import static com.oracle.graal.python.nodes.SpecialAttributeNames.__FILE__;
4242
import static com.oracle.graal.python.runtime.exception.PythonErrorType.ImportError;
4343
import static com.oracle.graal.python.runtime.exception.PythonErrorType.NotImplementedError;
44-
import static com.oracle.graal.python.runtime.exception.PythonErrorType.SystemError;
4544

4645
import java.io.IOException;
4746
import java.net.URI;
@@ -176,7 +175,7 @@ private Object loadDynamicModuleWithSpec(String name, String path, Node readNode
176175
throw raise(ImportError, "cannot load %s");
177176
} catch (RuntimeException e) {
178177
Throwable rootCaus = getRootCause(e);
179-
throw raise(SystemError, "cannot load %s: %s", path, rootCaus.getMessage());
178+
throw raise(ImportError, "cannot load %s: %s", path, rootCaus.getMessage());
180179
}
181180
TruffleObject pyinitFunc;
182181
try {

0 commit comments

Comments
 (0)