Mark Slee | 9f0c651 | 2007-02-28 23:58:26 +0000 | [diff] [blame] | 1 | // Copyright (c) 2006- Facebook |
| 2 | // Distributed under the Thrift Software License |
| 3 | // |
| 4 | // See accompanying file LICENSE or visit the Thrift site at: |
| 5 | // http://developers.facebook.com/thrift/ |
| 6 | |
Mark Slee | f5f2be4 | 2006-09-05 21:05:31 +0000 | [diff] [blame] | 7 | #ifndef _THRIFT_CONCURRENCY_EXCEPTION_H_ |
| 8 | #define _THRIFT_CONCURRENCY_EXCEPTION_H_ 1 |
Marc Slemko | 525c202 | 2006-07-20 00:29:35 +0000 | [diff] [blame] | 9 | |
| 10 | #include <exception> |
Aditya Agarwal | fdef47e | 2007-02-07 03:54:18 +0000 | [diff] [blame] | 11 | #include <Thrift.h> |
Marc Slemko | 525c202 | 2006-07-20 00:29:35 +0000 | [diff] [blame] | 12 | |
T Jake Luciani | b5e6221 | 2009-01-31 22:36:20 +0000 | [diff] [blame^] | 13 | namespace apache { namespace thrift { namespace concurrency { |
Marc Slemko | 525c202 | 2006-07-20 00:29:35 +0000 | [diff] [blame] | 14 | |
T Jake Luciani | b5e6221 | 2009-01-31 22:36:20 +0000 | [diff] [blame^] | 15 | class NoSuchTaskException : public apache::thrift::TException {}; |
Marc Slemko | 525c202 | 2006-07-20 00:29:35 +0000 | [diff] [blame] | 16 | |
T Jake Luciani | b5e6221 | 2009-01-31 22:36:20 +0000 | [diff] [blame^] | 17 | class UncancellableTaskException : public apache::thrift::TException {}; |
Marc Slemko | 525c202 | 2006-07-20 00:29:35 +0000 | [diff] [blame] | 18 | |
T Jake Luciani | b5e6221 | 2009-01-31 22:36:20 +0000 | [diff] [blame^] | 19 | class InvalidArgumentException : public apache::thrift::TException {}; |
Marc Slemko | 525c202 | 2006-07-20 00:29:35 +0000 | [diff] [blame] | 20 | |
T Jake Luciani | b5e6221 | 2009-01-31 22:36:20 +0000 | [diff] [blame^] | 21 | class IllegalStateException : public apache::thrift::TException {}; |
Marc Slemko | 525c202 | 2006-07-20 00:29:35 +0000 | [diff] [blame] | 22 | |
T Jake Luciani | b5e6221 | 2009-01-31 22:36:20 +0000 | [diff] [blame^] | 23 | class TimedOutException : public apache::thrift::TException { |
David Reiss | 0c90f6f | 2008-02-06 22:18:40 +0000 | [diff] [blame] | 24 | public: |
Aditya Agarwal | e04475b | 2007-05-23 02:14:58 +0000 | [diff] [blame] | 25 | TimedOutException():TException("TimedOutException"){}; |
David Reiss | 0c90f6f | 2008-02-06 22:18:40 +0000 | [diff] [blame] | 26 | TimedOutException(const std::string& message ) : |
Aditya Agarwal | e04475b | 2007-05-23 02:14:58 +0000 | [diff] [blame] | 27 | TException(message) {} |
| 28 | }; |
Marc Slemko | 525c202 | 2006-07-20 00:29:35 +0000 | [diff] [blame] | 29 | |
T Jake Luciani | b5e6221 | 2009-01-31 22:36:20 +0000 | [diff] [blame^] | 30 | class TooManyPendingTasksException : public apache::thrift::TException { |
David Reiss | 0c90f6f | 2008-02-06 22:18:40 +0000 | [diff] [blame] | 31 | public: |
Aditya Agarwal | e04475b | 2007-05-23 02:14:58 +0000 | [diff] [blame] | 32 | TooManyPendingTasksException():TException("TooManyPendingTasksException"){}; |
David Reiss | 0c90f6f | 2008-02-06 22:18:40 +0000 | [diff] [blame] | 33 | TooManyPendingTasksException(const std::string& message ) : |
Aditya Agarwal | e04475b | 2007-05-23 02:14:58 +0000 | [diff] [blame] | 34 | TException(message) {} |
| 35 | }; |
Marc Slemko | 3a3b53b | 2007-05-22 23:59:54 +0000 | [diff] [blame] | 36 | |
T Jake Luciani | b5e6221 | 2009-01-31 22:36:20 +0000 | [diff] [blame^] | 37 | class SystemResourceException : public apache::thrift::TException { |
Marc Slemko | 3a3b53b | 2007-05-22 23:59:54 +0000 | [diff] [blame] | 38 | public: |
| 39 | SystemResourceException() {} |
| 40 | |
| 41 | SystemResourceException(const std::string& message) : |
| 42 | TException(message) {} |
| 43 | }; |
| 44 | |
T Jake Luciani | b5e6221 | 2009-01-31 22:36:20 +0000 | [diff] [blame^] | 45 | }}} // apache::thrift::concurrency |
Marc Slemko | 525c202 | 2006-07-20 00:29:35 +0000 | [diff] [blame] | 46 | |
Mark Slee | f5f2be4 | 2006-09-05 21:05:31 +0000 | [diff] [blame] | 47 | #endif // #ifndef _THRIFT_CONCURRENCY_EXCEPTION_H_ |