command/Error: pass std::exception_ptr to PrintError()

Necessary to preserve type information.  The try/catch sequence didn't
work previously.
This commit is contained in:
Max Kellermann
2015-12-27 06:43:55 +01:00
parent 672e18cac9
commit 1c90400081
3 changed files with 15 additions and 8 deletions

View File

@@ -418,6 +418,6 @@ try {
return ret;
} catch (const std::exception &e) {
Response r(client, num);
PrintError(r, e);
PrintError(r, std::current_exception());
return CommandResult::ERROR;
}