* @brief Add an handler that will be called when a @c std::exception (or derived) is thrown inside a command handler. * If an exception handler is not set, the exception will be logget on the session output stream. * * @param handler the function to be called when an exception is thrown, taking a @c std::ostream& parameter to write on that session console, * th
| 160 | * the command entered and the exception thrown. |
| 161 | */ |
| 162 | void StdExceptionHandler(const std::function< void(std::ostream&, const std::string& cmd, const std::exception&) >& handler) |
| 163 | { |
| 164 | exceptionHandler = handler; |
| 165 | } |
| 166 | |
| 167 | /** |
| 168 | * @brief Add an handler that will be called when the user enter a wrong command (not existing command or having wrong parameters). |