~alan-griffiths/mir/mir_surface_state_horizmaximized

« back to all changes in this revision

Viewing changes to src/client/mir_prompt_session_api.cpp

Log exceptions at client boundary.

Approved by Cemil Azizoglu, PS Jenkins bot, Alberto Aguirre.

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
 * Authored by: Nick Dedekind <nick.dedekind@canonical.com>
17
17
 */
18
18
 
 
19
#define MIR_LOG_COMPONENT "MirPromptSessionAPI"
19
20
 
20
21
#include "mir_toolkit/mir_prompt_session.h"
21
22
#include "mir_prompt_session.h"
22
23
#include "mir_connection.h"
23
24
 
 
25
#include "uncaught.h"
 
26
 
24
27
#include <stdexcept>
25
28
#include <boost/throw_exception.hpp>
26
29
 
46
49
                     nullptr));
47
50
        return prompt_session;
48
51
    }
49
 
    catch (std::exception const&)
 
52
    catch (std::exception const& ex)
50
53
    {
51
54
        // TODO callback with an error
 
55
        MIR_LOG_UNCAUGHT_EXCEPTION(ex);
52
56
        return nullptr;
53
57
    }
54
58
}
65
69
            prompt_session->new_fds_for_prompt_providers(no_of_fds, callback, context) :
66
70
            nullptr;
67
71
    }
68
 
    catch (std::exception const&)
 
72
    catch (std::exception const& ex)
69
73
    {
 
74
        MIR_LOG_UNCAUGHT_EXCEPTION(ex);
70
75
        return nullptr;
71
76
    }
72
77
}