mirror of
https://github.com/genodelabs/genode.git
synced 2025-04-25 13:29:56 +00:00
The new 'raise' function can be used instead of 'throw' to keep the framework headers void of C++ throw statements, which would otherwise prevent the compilation of the headers with -fno-exceptions. In the presence of the C++ runtime, the 'raise' implementation reflects the supplied error value(s) as C++ exceptions of the appropriate type. In the (future) optional absence of the C++ runtime, 'raise' remains unresolved, which then gives us the assurance that the binary contains no code path leading to 'raise', all error conditions must have been covered in other ways than 'raise'. For this reason, 'Genode::raise' is not provided by the base library but the cxx library (C++ runtime). Once we allow components to opt out of the cxx library, 'raise' will automatically become unresolved for those strict components. Issue #5245