Exception.hpp 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. ///
  2. /// \file Proxy/Exception.hpp
  3. ///
  4. /// Exceptions thrown by the Proxy methods.
  5. ///
  6. /// \copyright
  7. /// Copyright (c) 2013-2014 Josh Blum
  8. /// SPDX-License-Identifier: BSL-1.0
  9. ///
  10. #pragma once
  11. #include <Pothos/Config.hpp>
  12. #include <Pothos/Exception.hpp>
  13. namespace Pothos {
  14. /*!
  15. * A ProxyEnvironmentFactoryError is thrown when a factory function fails.
  16. */
  17. POTHOS_DECLARE_EXCEPTION(POTHOS_API, ProxyEnvironmentFactoryError, RuntimeException);
  18. /*!
  19. * A ProxyEnvironmentFindError is thrown when a find method fails.
  20. */
  21. POTHOS_DECLARE_EXCEPTION(POTHOS_API, ProxyEnvironmentFindError, RuntimeException);
  22. /*!
  23. * A ProxyEnvironmentConvertError is thrown when a convert method fails.
  24. */
  25. POTHOS_DECLARE_EXCEPTION(POTHOS_API, ProxyEnvironmentConvertError, RuntimeException);
  26. /*!
  27. * A ProxyHandleCallError is thrown when a call operation fails.
  28. */
  29. POTHOS_DECLARE_EXCEPTION(POTHOS_API, ProxyHandleCallError, RuntimeException);
  30. /*!
  31. * A ProxyExceptionMessage is thrown when the call itself has an exception.
  32. * The exception usually comes from the proxy environment.
  33. * The message from the exception will be passed through this exception,
  34. * and retrieved with the what() method.
  35. */
  36. POTHOS_DECLARE_EXCEPTION(POTHOS_API, ProxyExceptionMessage, RuntimeException);
  37. /*!
  38. * A ProxyCompareError is thrown when compareTo fails.
  39. */
  40. POTHOS_DECLARE_EXCEPTION(POTHOS_API, ProxyCompareError, RuntimeException);
  41. /*!
  42. * A ProxySerializeError is thrown when de/serialize fails.
  43. */
  44. POTHOS_DECLARE_EXCEPTION(POTHOS_API, ProxySerializeError, RuntimeException);
  45. } //namespace Pothos