Mercurial > hg > orthanc-stone
comparison Framework/Loaders/LoaderStateMachine.cpp @ 840:47fc7919977d
Added details on errors in LoaderStateMachine + dummy change in loader.cpp
author | Benjamin Golinvaux <bgo@osimis.io> |
---|---|
date | Sun, 09 Jun 2019 18:47:34 +0200 |
parents | df442f1ba0c6 |
children | a7351ad54960 |
comparison
equal
deleted
inserted
replaced
839:c47031d9f6b1 | 840:47fc7919977d |
---|---|
105 | 105 |
106 | 106 |
107 void LoaderStateMachine::HandleExceptionMessage(const OracleCommandExceptionMessage& message) | 107 void LoaderStateMachine::HandleExceptionMessage(const OracleCommandExceptionMessage& message) |
108 { | 108 { |
109 LOG(ERROR) << "Error in the state machine, stopping all processing"; | 109 LOG(ERROR) << "Error in the state machine, stopping all processing"; |
110 Clear(); | 110 LOG(ERROR) << "Error: " << message.GetException().What() << " Details: " << |
111 message.GetException().GetDetails(); | |
112 Clear(); | |
111 } | 113 } |
112 | 114 |
113 | 115 |
114 template <typename T> | 116 template <typename T> |
115 void LoaderStateMachine::HandleSuccessMessage(const T& message) | 117 void LoaderStateMachine::HandleSuccessMessage(const T& message) |
122 dynamic_cast<State&>(message.GetOrigin().GetPayload()).Handle(message); | 124 dynamic_cast<State&>(message.GetOrigin().GetPayload()).Handle(message); |
123 Step(); | 125 Step(); |
124 } | 126 } |
125 catch (Orthanc::OrthancException& e) | 127 catch (Orthanc::OrthancException& e) |
126 { | 128 { |
127 LOG(ERROR) << "Error in the state machine, stopping all processing: " << e.What(); | 129 LOG(ERROR) << "Error in the state machine, stopping all processing: " << |
130 e.What() << " Details: " << e.GetDetails(); | |
128 Clear(); | 131 Clear(); |
129 } | 132 } |
130 } | 133 } |
131 | 134 |
132 | 135 |