blob: 735cd87830894b9985e9f8ed7d70a245a67c1239 [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 Agarwalfdef47e2007-02-07 03:54:18 +000023class TimedOutException : public facebook::thrift::TException {};
Marc Slemko525c2022006-07-20 00:29:35 +000024
Marc Slemko3a3b53b2007-05-22 23:59:54 +000025class TooManyPendingTasksException : public facebook::thrift::TException {};
26
27class SystemResourceException : public facebook::thrift::TException {
28public:
29 SystemResourceException() {}
30
31 SystemResourceException(const std::string& message) :
32 TException(message) {}
33};
34
Marc Slemko525c2022006-07-20 00:29:35 +000035}}} // facebook::thrift::concurrency
36
Mark Sleef5f2be42006-09-05 21:05:31 +000037#endif // #ifndef _THRIFT_CONCURRENCY_EXCEPTION_H_