mirror of
https://github.com/genodelabs/genode.git
synced 2025-01-18 18:56:29 +00:00
Translate buffer-exceeded exception in Session_requester
Session_requester inherits from Dynamic_rom_session::Content_producer which specifies the Buffer_capacity_exceeded exception which is thrown on insufficient buffer space.
This commit is contained in:
parent
c18dffa9fa
commit
78f1fd29f7
@ -35,9 +35,13 @@ class Genode::Session_requester
|
||||
|
||||
void produce_content(char *dst, Genode::size_t dst_len) override
|
||||
{
|
||||
Xml_generator xml(dst, dst_len, "session_requests", [&] () {
|
||||
_id_space.for_each<Session_state const>([&] (Session_state const &s) {
|
||||
s.generate_session_request(xml); }); });
|
||||
try {
|
||||
Xml_generator xml(dst, dst_len, "session_requests", [&] () {
|
||||
_id_space.for_each<Session_state const>([&] (Session_state const &s) {
|
||||
s.generate_session_request(xml); }); });
|
||||
} catch (Xml_generator::Buffer_exceeded &) {
|
||||
throw Buffer_capacity_exceeded();
|
||||
}
|
||||
}
|
||||
} _content_producer { _id_space };
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user