Exception.hpp 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. ///
  2. /// \file Framework/Exception.hpp
  3. ///
  4. /// Exceptions thrown by the Framework 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 SharedBufferError is thrown when the SharedBuffer can't allocate.
  16. */
  17. POTHOS_DECLARE_EXCEPTION(POTHOS_API, SharedBufferError, RuntimeException)
  18. /*!
  19. * A BufferManagerFactoryError is thrown when the factory has an error.
  20. */
  21. POTHOS_DECLARE_EXCEPTION(POTHOS_API, BufferManagerFactoryError, RuntimeException)
  22. /*!
  23. * A BufferPushError is thrown when buffers are pushed to the wrong queue.
  24. */
  25. POTHOS_DECLARE_EXCEPTION(POTHOS_API, BufferPushError, RuntimeException)
  26. /*!
  27. * A PortAccessError is thrown when an invalid worker port identifier is used.
  28. */
  29. POTHOS_DECLARE_EXCEPTION(POTHOS_API, PortAccessError, RangeException)
  30. /*!
  31. * A DTypeUnknownError is thrown when an unknown DType identifier is used.
  32. */
  33. POTHOS_DECLARE_EXCEPTION(POTHOS_API, DTypeUnknownError, RuntimeException)
  34. /*!
  35. * A TopologyConnectError is thrown when a dis/connection is not possible.
  36. */
  37. POTHOS_DECLARE_EXCEPTION(POTHOS_API, TopologyConnectError, RuntimeException)
  38. /*!
  39. * A BlockCallNotFound is thrown when a call by the given name cannot be found.
  40. */
  41. POTHOS_DECLARE_EXCEPTION(POTHOS_API, BlockCallNotFound, RuntimeException)
  42. /*!
  43. * A PortDomainError is thrown from getInput/OutputBufferManager() for incompatible domains.
  44. */
  45. POTHOS_DECLARE_EXCEPTION(POTHOS_API, PortDomainError, RuntimeException)
  46. /*!
  47. * A ThreadPoolError is thrown when ThreadPoolArgs are invalid.
  48. */
  49. POTHOS_DECLARE_EXCEPTION(POTHOS_API, ThreadPoolError, RuntimeException)
  50. /*!
  51. * A BufferConvertError is thrown when a conversion is not possible.
  52. */
  53. POTHOS_DECLARE_EXCEPTION(POTHOS_API, BufferConvertError, RuntimeException)
  54. } //namespace Pothos