Skip to content

Commit 80ffa67

Browse files
committed
Unify unsupported messages in emulated backend
1 parent 5291d9c commit 80ffa67

File tree

2 files changed

+57
-53
lines changed

2 files changed

+57
-53
lines changed

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,7 @@
122122
import com.oracle.graal.python.runtime.PosixSupportLibrary.OpenPtyResult;
123123
import com.oracle.graal.python.runtime.PosixSupportLibrary.PosixException;
124124
import com.oracle.graal.python.runtime.PosixSupportLibrary.Timeval;
125+
import com.oracle.graal.python.runtime.PosixSupportLibrary.UnsupportedPosixFeatureException;
125126
import com.oracle.graal.python.runtime.PythonContext;
126127
import com.oracle.graal.python.runtime.PythonOptions;
127128
import com.oracle.graal.python.runtime.exception.PException;
@@ -2637,6 +2638,8 @@ PTuple waitpid(VirtualFrame frame, long pid, int options,
26372638
gil.acquire();
26382639
throw constructAndRaiseNode.get(inliningTarget).raiseOSErrorFromPosixException(frame, e);
26392640
}
2641+
} catch (UnsupportedPosixFeatureException e) {
2642+
throw constructAndRaiseNode.get(inliningTarget).raiseOSErrorUnsupported(frame, e);
26402643
}
26412644
}
26422645
} finally {
@@ -2985,6 +2988,8 @@ PNone kill(VirtualFrame frame, long pid, int signal,
29852988
return PNone.NONE;
29862989
} catch (PosixException e) {
29872990
throw constructAndRaiseNode.get(inliningTarget).raiseOSErrorFromPosixException(frame, e);
2991+
} catch (UnsupportedPosixFeatureException e) {
2992+
throw constructAndRaiseNode.get(inliningTarget).raiseOSErrorUnsupported(frame, e);
29882993
}
29892994
}
29902995
}
@@ -3011,6 +3016,8 @@ PNone kill(VirtualFrame frame, long pid, int signal,
30113016
return PNone.NONE;
30123017
} catch (PosixException e) {
30133018
throw constructAndRaiseNode.get(inliningTarget).raiseOSErrorFromPosixException(frame, e);
3019+
} catch (UnsupportedPosixFeatureException e) {
3020+
throw constructAndRaiseNode.get(inliningTarget).raiseOSErrorUnsupported(frame, e);
30143021
}
30153022
}
30163023
}

0 commit comments

Comments
 (0)