2014-10-22 21:15:14 +00:00
|
|
|
//============================================================================
|
|
|
|
// Copyright (c) Kitware, Inc.
|
|
|
|
// All rights reserved.
|
|
|
|
// See LICENSE.txt for details.
|
2019-04-15 23:24:21 +00:00
|
|
|
//
|
2014-10-22 21:15:14 +00:00
|
|
|
// This software is distributed WITHOUT ANY WARRANTY; without even
|
|
|
|
// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
|
|
|
// PURPOSE. See the above copyright notice for more information.
|
|
|
|
//============================================================================
|
2017-01-09 21:15:32 +00:00
|
|
|
#ifndef vtk_m_cont_ErrorBadType_h
|
|
|
|
#define vtk_m_cont_ErrorBadType_h
|
2014-10-22 21:15:14 +00:00
|
|
|
|
2017-01-09 21:15:32 +00:00
|
|
|
#include <vtkm/cont/Error.h>
|
2014-10-22 21:15:14 +00:00
|
|
|
|
2017-05-18 14:29:41 +00:00
|
|
|
namespace vtkm
|
|
|
|
{
|
|
|
|
namespace cont
|
|
|
|
{
|
2014-10-22 21:15:14 +00:00
|
|
|
|
2017-04-13 18:06:33 +00:00
|
|
|
VTKM_SILENCE_WEAK_VTABLE_WARNING_START
|
|
|
|
|
2014-10-22 21:15:14 +00:00
|
|
|
/// This class is thrown when VTK-m encounters data of a type that is
|
|
|
|
/// incompatible with the current operation.
|
|
|
|
///
|
2017-01-09 21:15:32 +00:00
|
|
|
class VTKM_ALWAYS_EXPORT ErrorBadType : public Error
|
2014-10-22 21:15:14 +00:00
|
|
|
{
|
|
|
|
public:
|
2017-05-18 14:29:41 +00:00
|
|
|
ErrorBadType(const std::string& message)
|
2019-01-24 17:59:35 +00:00
|
|
|
: Error(message, true)
|
2017-05-18 14:29:41 +00:00
|
|
|
{
|
|
|
|
}
|
2014-10-22 21:15:14 +00:00
|
|
|
};
|
|
|
|
|
2017-04-13 18:06:33 +00:00
|
|
|
VTKM_SILENCE_WEAK_VTABLE_WARNING_END
|
2018-11-06 16:20:30 +00:00
|
|
|
|
|
|
|
/// Throws an ErrorBadType exception with the following message:
|
|
|
|
/// Cast failed: \c baseType --> \c derivedType".
|
2021-04-02 17:37:49 +00:00
|
|
|
/// This is generally caused by asking for a casting of a UnknownArrayHandle
|
|
|
|
/// or UncertainArrayhandle with an insufficient type list.
|
2018-11-06 16:20:30 +00:00
|
|
|
//
|
|
|
|
VTKM_CONT_EXPORT void throwFailedDynamicCast(const std::string& baseType,
|
|
|
|
const std::string& derivedType);
|
2014-10-22 21:15:14 +00:00
|
|
|
}
|
|
|
|
} // namespace vtkm::cont
|
|
|
|
|
2017-01-09 21:15:32 +00:00
|
|
|
#endif //vtk_m_cont_ErrorBadType_h
|