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 | fdef47e | 2007-02-07 03:54:18 +0000 | [diff] [blame] | 23 | class TimedOutException : public facebook::thrift::TException {}; |
Marc Slemko | 525c202 | 2006-07-20 00:29:35 +0000 | [diff] [blame] | 24 | |
Marc Slemko | 3a3b53b | 2007-05-22 23:59:54 +0000 | [diff] [blame^] | 25 | class TooManyPendingTasksException : public facebook::thrift::TException {}; |
| 26 | |
| 27 | class SystemResourceException : public facebook::thrift::TException { |
| 28 | public: |
| 29 | SystemResourceException() {} |
| 30 | |
| 31 | SystemResourceException(const std::string& message) : |
| 32 | TException(message) {} |
| 33 | }; |
| 34 | |
Marc Slemko | 525c202 | 2006-07-20 00:29:35 +0000 | [diff] [blame] | 35 | }}} // facebook::thrift::concurrency |
| 36 | |
Mark Slee | f5f2be4 | 2006-09-05 21:05:31 +0000 | [diff] [blame] | 37 | #endif // #ifndef _THRIFT_CONCURRENCY_EXCEPTION_H_ |