diff options
| author | Carl Hetherington <cth@carlh.net> | 2020-08-17 07:58:04 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2020-08-17 13:17:24 +0200 |
| commit | bd23f55d8cd73adda823d0a2fcabc129b8845a81 (patch) | |
| tree | 72e6aff9dedcd13b1ed3282dabeb058091f3428b /src/lib/butler.h | |
| parent | 7c5e4e6b7a29db93184a57076d05193a8360561d (diff) | |
Report more detailed errors when the butler dies.
Diffstat (limited to 'src/lib/butler.h')
| -rw-r--r-- | src/lib/butler.h | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/src/lib/butler.h b/src/lib/butler.h index 4d4fa4a09..a62eb0525 100644 --- a/src/lib/butler.h +++ b/src/lib/butler.h @@ -49,10 +49,22 @@ public: void seek (DCPTime position, bool accurate); - enum Error { - NONE, - AGAIN, - DIED + class Error { + public: + enum Code { + NONE, + AGAIN, + DIED + }; + + Error () + : code(NONE) + {} + + Code code; + std::string message; + + std::string summary () const; }; std::pair<boost::shared_ptr<PlayerVideo>, DCPTime> get_video (Error* e = 0); @@ -99,6 +111,7 @@ private: int _suspended; bool _finished; bool _died; + std::string _died_message; bool _stop_thread; AudioMapping _audio_mapping; |
