MCPcopy Create free account
hub / github.com/asterinas/vostd / catch_panics_as_oops

Function catch_panics_as_oops

kernel/src/thread/oops.rs:50–73  ·  view source on GitHub ↗

Executes the given function and catches any panics that occur. All the panics in the given function will be regarded as oops. If a oops happens, this function returns `None`. Otherwise, it returns the return value of the given function. If the kernel is configured to panic on oops, this function will not return when a oops happens.

(f: F)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 2

buildMethod · 0.85
create_new_user_taskFunction · 0.85

Calls 3

catch_unwindFunction · 0.85
abortFunction · 0.85
unwrapMethod · 0.45

Tested by

no test coverage detected