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 | |
Marc Slemko | 3a3b53b | 2007-05-22 23:59:54 +0000 | [diff] [blame] | 13 | namespace facebook { namespace thrift { namespace concurrency { |
Marc Slemko | 525c202 | 2006-07-20 00:29:35 +0000 | [diff] [blame] | 14 | |
Aditya Agarwal | fdef47e | 2007-02-07 03:54:18 +0000 | [diff] [blame] | 15 | class NoSuchTaskException : public facebook::thrift::TException {}; |
Marc Slemko | 525c202 | 2006-07-20 00:29:35 +0000 | [diff] [blame] | 16 | |
Aditya Agarwal | fdef47e | 2007-02-07 03:54:18 +0000 | [diff] [blame] | 17 | class UncancellableTaskException : public facebook::thrift::TException {}; |
Marc Slemko | 525c202 | 2006-07-20 00:29:35 +0000 | [diff] [blame] | 18 | |
Aditya Agarwal | fdef47e | 2007-02-07 03:54:18 +0000 | [diff] [blame] | 19 | class InvalidArgumentException : public facebook::thrift::TException {}; |
Marc Slemko | 525c202 | 2006-07-20 00:29:35 +0000 | [diff] [blame] | 20 | |
Aditya Agarwal | fdef47e | 2007-02-07 03:54:18 +0000 | [diff] [blame] | 21 | class IllegalStateException : public facebook::thrift::TException {}; |
Marc Slemko | 525c202 | 2006-07-20 00:29:35 +0000 | [diff] [blame] | 22 | |
Aditya Agarwal | e04475b | 2007-05-23 02:14:58 +0000 | [diff] [blame^] | 23 | class TimedOutException : public facebook::thrift::TException { |
| 24 | public: |
| 25 | TimedOutException():TException("TimedOutException"){}; |
| 26 | TimedOutException(const std::string& message ) : |
| 27 | TException(message) {} |
| 28 | }; |
Marc Slemko | 525c202 | 2006-07-20 00:29:35 +0000 | [diff] [blame] | 29 | |
Aditya Agarwal | e04475b | 2007-05-23 02:14:58 +0000 | [diff] [blame^] | 30 | class TooManyPendingTasksException : public facebook::thrift::TException { |
| 31 | public: |
| 32 | TooManyPendingTasksException():TException("TooManyPendingTasksException"){}; |
| 33 | TooManyPendingTasksException(const std::string& message ) : |
| 34 | TException(message) {} |
| 35 | }; |
Marc Slemko | 3a3b53b | 2007-05-22 23:59:54 +0000 | [diff] [blame] | 36 | |
| 37 | class SystemResourceException : public facebook::thrift::TException { |
| 38 | public: |
| 39 | SystemResourceException() {} |
| 40 | |
| 41 | SystemResourceException(const std::string& message) : |
| 42 | TException(message) {} |
| 43 | }; |
| 44 | |
Marc Slemko | 525c202 | 2006-07-20 00:29:35 +0000 | [diff] [blame] | 45 | }}} // facebook::thrift::concurrency |
| 46 | |
Mark Slee | f5f2be4 | 2006-09-05 21:05:31 +0000 | [diff] [blame] | 47 | #endif // #ifndef _THRIFT_CONCURRENCY_EXCEPTION_H_ |