Skip to content

Commit 11a2632

Browse files
committed
add throw for consistency
1 parent e24d52e commit 11a2632

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -895,7 +895,7 @@ static PNone mutate(PythonModule self,
895895
try {
896896
version = dylib.getLongOrDefault(self, FILTERS_VERSION, 0);
897897
} catch (UnexpectedResultException e) {
898-
CompilerDirectives.shouldNotReachHere();
898+
throw CompilerDirectives.shouldNotReachHere();
899899
}
900900
dylib.putLong(self, FILTERS_VERSION, version + 1);
901901
return PNone.NONE;

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/object/DefaultPythonObjectExports.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,7 @@ static Object doGeneric(Object receiver, ThreadState threadState,
417417
try {
418418
return lib.getIterator(receiver);
419419
} catch (UnsupportedMessageException e) {
420-
CompilerDirectives.shouldNotReachHere();
420+
throw CompilerDirectives.shouldNotReachHere();
421421
}
422422
} else if (lib.hasArrayElements(receiver)) {
423423
return doForeignArray(receiver, threadState, factory, raiseNode, lib);

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/nodes/statement/RaiseNode.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ static void doRaise(VirtualFrame frame, Object exception, Object cause,
212212
try {
213213
throw lib.throwException(exception);
214214
} catch (UnsupportedMessageException e) {
215-
CompilerDirectives.shouldNotReachHere();
215+
throw CompilerDirectives.shouldNotReachHere();
216216
}
217217
}
218218
throw raiseNoException(raise);

0 commit comments

Comments
 (0)