blob: 575a3edd92ccb774baa446610cac7c614ca64d38 [file] [log] [blame]
Mark Slee9f0c6512007-02-28 23:58:26 +00001// 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 Sleef5f2be42006-09-05 21:05:31 +00007#ifndef _THRIFT_CONCURRENCY_EXCEPTION_H_
8#define _THRIFT_CONCURRENCY_EXCEPTION_H_ 1
Marc Slemko525c2022006-07-20 00:29:35 +00009
10#include <exception>
Aditya Agarwalfdef47e2007-02-07 03:54:18 +000011#include <Thrift.h>
Marc Slemko525c2022006-07-20 00:29:35 +000012
Marc Slemko3a3b53b2007-05-22 23:59:54 +000013namespace facebook { namespace thrift { namespace concurrency {
Marc Slemko525c2022006-07-20 00:29:35 +000014
Aditya Agarwalfdef47e2007-02-07 03:54:18 +000015class NoSuchTaskException : public facebook::thrift::TException {};
Marc Slemko525c2022006-07-20 00:29:35 +000016
Aditya Agarwalfdef47e2007-02-07 03:54:18 +000017class UncancellableTaskException : public facebook::thrift::TException {};
Marc Slemko525c2022006-07-20 00:29:35 +000018
Aditya Agarwalfdef47e2007-02-07 03:54:18 +000019class InvalidArgumentException : public facebook::thrift::TException {};
Marc Slemko525c2022006-07-20 00:29:35 +000020
Aditya Agarwalfdef47e2007-02-07 03:54:18 +000021class IllegalStateException : public facebook::thrift::TException {};
Marc Slemko525c2022006-07-20 00:29:35 +000022
Aditya Agarwale04475b2007-05-23 02:14:58 +000023class TimedOutException : public facebook::thrift::TException {
24public:
25 TimedOutException():TException("TimedOutException"){};
26 TimedOutException(const std::string& message ) :
27 TException(message) {}
28};
Marc Slemko525c2022006-07-20 00:29:35 +000029
Aditya Agarwale04475b2007-05-23 02:14:58 +000030class TooManyPendingTasksException : public facebook::thrift::TException {
31public:
32 TooManyPendingTasksException():TException("TooManyPendingTasksException"){};
33 TooManyPendingTasksException(const std::string& message ) :
34 TException(message) {}
35};
Marc Slemko3a3b53b2007-05-22 23:59:54 +000036
37class SystemResourceException : public facebook::thrift::TException {
38public:
39 SystemResourceException() {}
40
41 SystemResourceException(const std::string& message) :
42 TException(message) {}
43};
44
Marc Slemko525c2022006-07-20 00:29:35 +000045}}} // facebook::thrift::concurrency
46
Mark Sleef5f2be42006-09-05 21:05:31 +000047#endif // #ifndef _THRIFT_CONCURRENCY_EXCEPTION_H_