| David Reiss | ea2cba8 | 2009-03-30 21:35:00 +0000 | [diff] [blame] | 1 | /* | 
|  | 2 | * Licensed to the Apache Software Foundation (ASF) under one | 
|  | 3 | * or more contributor license agreements. See the NOTICE file | 
|  | 4 | * distributed with this work for additional information | 
|  | 5 | * regarding copyright ownership. The ASF licenses this file | 
|  | 6 | * to you under the Apache License, Version 2.0 (the | 
|  | 7 | * "License"); you may not use this file except in compliance | 
|  | 8 | * with the License. You may obtain a copy of the License at | 
|  | 9 | * | 
|  | 10 | *   http://www.apache.org/licenses/LICENSE-2.0 | 
|  | 11 | * | 
|  | 12 | * Unless required by applicable law or agreed to in writing, | 
|  | 13 | * software distributed under the License is distributed on an | 
|  | 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | 
|  | 15 | * KIND, either express or implied. See the License for the | 
|  | 16 | * specific language governing permissions and limitations | 
|  | 17 | * under the License. | 
|  | 18 | */ | 
| Mark Slee | 9f0c651 | 2007-02-28 23:58:26 +0000 | [diff] [blame] | 19 |  | 
| Mark Slee | f5f2be4 | 2006-09-05 21:05:31 +0000 | [diff] [blame] | 20 | #ifndef _THRIFT_CONCURRENCY_EXCEPTION_H_ | 
|  | 21 | #define _THRIFT_CONCURRENCY_EXCEPTION_H_ 1 | 
| Marc Slemko | 525c202 | 2006-07-20 00:29:35 +0000 | [diff] [blame] | 22 |  | 
|  | 23 | #include <exception> | 
| Aditya Agarwal | fdef47e | 2007-02-07 03:54:18 +0000 | [diff] [blame] | 24 | #include <Thrift.h> | 
| Marc Slemko | 525c202 | 2006-07-20 00:29:35 +0000 | [diff] [blame] | 25 |  | 
| T Jake Luciani | b5e6221 | 2009-01-31 22:36:20 +0000 | [diff] [blame] | 26 | namespace apache { namespace thrift { namespace concurrency { | 
| Marc Slemko | 525c202 | 2006-07-20 00:29:35 +0000 | [diff] [blame] | 27 |  | 
| T Jake Luciani | b5e6221 | 2009-01-31 22:36:20 +0000 | [diff] [blame] | 28 | class NoSuchTaskException : public apache::thrift::TException {}; | 
| 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 UncancellableTaskException : public apache::thrift::TException {}; | 
| Marc Slemko | 525c202 | 2006-07-20 00:29:35 +0000 | [diff] [blame] | 31 |  | 
| T Jake Luciani | b5e6221 | 2009-01-31 22:36:20 +0000 | [diff] [blame] | 32 | class InvalidArgumentException : public apache::thrift::TException {}; | 
| Marc Slemko | 525c202 | 2006-07-20 00:29:35 +0000 | [diff] [blame] | 33 |  | 
| Jake Farrell | 4013fa3 | 2011-09-09 04:10:32 +0000 | [diff] [blame] | 34 | class IllegalStateException : public apache::thrift::TException { | 
|  | 35 | public: | 
|  | 36 | IllegalStateException() {} | 
|  | 37 | IllegalStateException(const std::string& message) : TException(message) {} | 
|  | 38 | }; | 
| Marc Slemko | 525c202 | 2006-07-20 00:29:35 +0000 | [diff] [blame] | 39 |  | 
| T Jake Luciani | b5e6221 | 2009-01-31 22:36:20 +0000 | [diff] [blame] | 40 | class TimedOutException : public apache::thrift::TException { | 
| David Reiss | 0c90f6f | 2008-02-06 22:18:40 +0000 | [diff] [blame] | 41 | public: | 
| Aditya Agarwal | e04475b | 2007-05-23 02:14:58 +0000 | [diff] [blame] | 42 | TimedOutException():TException("TimedOutException"){}; | 
| David Reiss | 0c90f6f | 2008-02-06 22:18:40 +0000 | [diff] [blame] | 43 | TimedOutException(const std::string& message ) : | 
| Aditya Agarwal | e04475b | 2007-05-23 02:14:58 +0000 | [diff] [blame] | 44 | TException(message) {} | 
|  | 45 | }; | 
| Marc Slemko | 525c202 | 2006-07-20 00:29:35 +0000 | [diff] [blame] | 46 |  | 
| T Jake Luciani | b5e6221 | 2009-01-31 22:36:20 +0000 | [diff] [blame] | 47 | class TooManyPendingTasksException : public apache::thrift::TException { | 
| David Reiss | 0c90f6f | 2008-02-06 22:18:40 +0000 | [diff] [blame] | 48 | public: | 
| Aditya Agarwal | e04475b | 2007-05-23 02:14:58 +0000 | [diff] [blame] | 49 | TooManyPendingTasksException():TException("TooManyPendingTasksException"){}; | 
| David Reiss | 0c90f6f | 2008-02-06 22:18:40 +0000 | [diff] [blame] | 50 | TooManyPendingTasksException(const std::string& message ) : | 
| Aditya Agarwal | e04475b | 2007-05-23 02:14:58 +0000 | [diff] [blame] | 51 | TException(message) {} | 
|  | 52 | }; | 
| Marc Slemko | 3a3b53b | 2007-05-22 23:59:54 +0000 | [diff] [blame] | 53 |  | 
| T Jake Luciani | b5e6221 | 2009-01-31 22:36:20 +0000 | [diff] [blame] | 54 | class SystemResourceException : public apache::thrift::TException { | 
| Marc Slemko | 3a3b53b | 2007-05-22 23:59:54 +0000 | [diff] [blame] | 55 | public: | 
|  | 56 | SystemResourceException() {} | 
|  | 57 |  | 
|  | 58 | SystemResourceException(const std::string& message) : | 
|  | 59 | TException(message) {} | 
|  | 60 | }; | 
|  | 61 |  | 
| T Jake Luciani | b5e6221 | 2009-01-31 22:36:20 +0000 | [diff] [blame] | 62 | }}} // apache::thrift::concurrency | 
| Marc Slemko | 525c202 | 2006-07-20 00:29:35 +0000 | [diff] [blame] | 63 |  | 
| Mark Slee | f5f2be4 | 2006-09-05 21:05:31 +0000 | [diff] [blame] | 64 | #endif // #ifndef _THRIFT_CONCURRENCY_EXCEPTION_H_ |