Record state error msg in debug log
Summary: When an operation fails, we have an error message. This was being displayed in the diagnostic screen output, but not included in the debug log. This makes them both have same bahaviour, so they both include the error messages. Reviewed By: passy Differential Revision: D17181847 fbshipit-source-id: 823f73d641d2315da86a0019479716852950f9a5
This commit is contained in:
committed by
Facebook Github Bot
parent
be6a99c8f9
commit
66d9b563ce
@@ -49,10 +49,11 @@ void FlipperState::success(std::string step) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void FlipperState::failed(std::string step, std::string errorMessage) {
|
void FlipperState::failed(std::string step, std::string errorMessage) {
|
||||||
|
std::string message = "[Failed] " + step + ": " + errorMessage;
|
||||||
#if FLIPPER_DEBUG_LOG
|
#if FLIPPER_DEBUG_LOG
|
||||||
log("[failed] " + step);
|
log(message);
|
||||||
#endif
|
#endif
|
||||||
logs = logs + "[Failed] " + step + ": " + errorMessage + "\n";
|
logs = logs + message + "\n";
|
||||||
stateMap[step] = State::failed;
|
stateMap[step] = State::failed;
|
||||||
if (mListener) {
|
if (mListener) {
|
||||||
mListener->onUpdate();
|
mListener->onUpdate();
|
||||||
|
|||||||
Reference in New Issue
Block a user