summaryrefslogtreecommitdiff
path: root/include/CommandFailedException.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/CommandFailedException.h')
-rw-r--r--include/CommandFailedException.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/include/CommandFailedException.h b/include/CommandFailedException.h
index 8bcdcae..3753ad4 100644
--- a/include/CommandFailedException.h
+++ b/include/CommandFailedException.h
@@ -11,8 +11,8 @@
class CommandFailedException : public std::exception {
public:
- uint8_t last_command_code;
- uint8_t last_command_status;
+ const uint8_t last_command_code;
+ const uint8_t last_command_status;
CommandFailedException(uint8_t last_command_code, uint8_t last_command_status) :
last_command_code(last_command_code),
@@ -24,6 +24,10 @@ public:
return "Command execution has failed on device";
}
+ bool reason_slot_not_programmed() const throw(){
+ return last_command_status == 3; //FIXME use enum status codes
+ }
+
};