Commit f601e38b authored by David C. Lonie's avatar David C. Lonie

Simplify exception hierarchy.

Remove the ErrorControl class such that all subclasses now inherit from
error. Renamed all exception classes via s/ErrorControl/Error/.

See issue #57.
parent d24f53a6
......@@ -26,8 +26,8 @@
#include <vtkm/Types.h>
#include <vtkm/cont/ArrayPortalToIterators.h>
#include <vtkm/cont/ErrorControlBadValue.h>
#include <vtkm/cont/ErrorControlInternal.h>
#include <vtkm/cont/ErrorBadValue.h>
#include <vtkm/cont/ErrorInternal.h>
#include <vtkm/cont/Storage.h>
#include <vtkm/cont/StorageBasic.h>
......@@ -338,8 +338,8 @@ public:
///
/// The allocation may be done on an already existing array, but can wipe out
/// any data already in the array. This method can throw
/// ErrorControlBadAllocation if the array cannot be allocated or
/// ErrorControlBadValue if the allocation is not feasible (for example, the
/// ErrorBadAllocation if the array cannot be allocated or
/// ErrorBadValue if the allocation is not feasible (for example, the
/// array storage is read-only).
///
VTKM_CONT
......
......@@ -32,7 +32,7 @@ ArrayHandle<T,S>::GetStorage()
}
else
{
throw vtkm::cont::ErrorControlInternal(
throw vtkm::cont::ErrorInternal(
"ArrayHandle::SyncControlArray did not make control array valid.");
}
}
......@@ -48,7 +48,7 @@ ArrayHandle<T,S>::GetStorage() const
}
else
{
throw vtkm::cont::ErrorControlInternal(
throw vtkm::cont::ErrorInternal(
"ArrayHandle::SyncControlArray did not make control array valid.");
}
}
......@@ -68,7 +68,7 @@ ArrayHandle<T,S>::GetPortalControl()
}
else
{
throw vtkm::cont::ErrorControlInternal(
throw vtkm::cont::ErrorInternal(
"ArrayHandle::SyncControlArray did not make control array valid.");
}
}
......@@ -84,7 +84,7 @@ ArrayHandle<T,S>::GetPortalConstControl() const
}
else
{
throw vtkm::cont::ErrorControlInternal(
throw vtkm::cont::ErrorInternal(
"ArrayHandle::SyncControlArray did not make control array valid.");
}
}
......@@ -121,7 +121,7 @@ void ArrayHandle<T,S>::CopyInto(IteratorType dest, DeviceAdapterTag) const
if (!this->Internals->ControlArrayValid &&
!this->Internals->ExecutionArrayValid)
{
throw vtkm::cont::ErrorControlBadValue(
throw vtkm::cont::ErrorBadValue(
"ArrayHandle has no data to copy into Iterator.");
}
......@@ -170,7 +170,7 @@ void ArrayHandle<T,S>::Shrink(vtkm::Id numberOfValues)
}
else // numberOfValues > originalNumberOfValues
{
throw vtkm::cont::ErrorControlBadValue(
throw vtkm::cont::ErrorBadValue(
"ArrayHandle::Shrink cannot be used to grow array.");
}
......@@ -187,7 +187,7 @@ ArrayHandle<T,S>::PrepareForInput(DeviceAdapterTag) const
if (!this->Internals->ControlArrayValid
&& !this->Internals->ExecutionArrayValid)
{
throw vtkm::cont::ErrorControlBadValue(
throw vtkm::cont::ErrorBadValue(
"ArrayHandle has no data when PrepareForInput called.");
}
......@@ -242,7 +242,7 @@ ArrayHandle<T,S>::PrepareForInPlace(DeviceAdapterTag)
if (!this->Internals->ControlArrayValid
&& !this->Internals->ExecutionArrayValid)
{
throw vtkm::cont::ErrorControlBadValue(
throw vtkm::cont::ErrorBadValue(
"ArrayHandle has no data when PrepareForInPlace called.");
}
......
......@@ -23,7 +23,7 @@
#include <vtkm/Assert.h>
#include <vtkm/cont/ArrayHandle.h>
#include <vtkm/cont/ErrorControlBadAllocation.h>
#include <vtkm/cont/ErrorBadAllocation.h>
namespace vtkm {
namespace exec {
......@@ -229,13 +229,13 @@ public:
VTKM_CONT
void Allocate(vtkm::Id /*numberOfValues*/)
{
throw vtkm::cont::ErrorControlBadAllocation("Does not make sense.");
throw vtkm::cont::ErrorBadAllocation("Does not make sense.");
}
VTKM_CONT
void Shrink(vtkm::Id /*numberOfValues*/)
{
throw vtkm::cont::ErrorControlBadAllocation("Does not make sense.");
throw vtkm::cont::ErrorBadAllocation("Does not make sense.");
}
VTKM_CONT
......@@ -327,7 +327,7 @@ public:
VTKM_CONT
PortalExecution PrepareForInPlace(bool vtkmNotUsed(updateData))
{
throw vtkm::cont::ErrorControlBadAllocation(
throw vtkm::cont::ErrorBadAllocation(
"Cannot write to an ArrayHandleCartesianProduct. It does not make "
"sense because there is overlap in the data.");
}
......@@ -335,7 +335,7 @@ public:
VTKM_CONT
PortalExecution PrepareForOutput(vtkm::Id vtkmNotUsed(numberOfValues))
{
throw vtkm::cont::ErrorControlBadAllocation(
throw vtkm::cont::ErrorBadAllocation(
"Cannot write to an ArrayHandleCartesianProduct. It does not make "
"sense because there is overlap in the data.");
}
......@@ -351,7 +351,7 @@ public:
VTKM_CONT
void Shrink(vtkm::Id /*numberOfValues*/)
{
throw vtkm::cont::ErrorControlBadAllocation("Does not make sense.");
throw vtkm::cont::ErrorBadAllocation("Does not make sense.");
}
VTKM_CONT
......
......@@ -21,8 +21,8 @@
#define vtk_m_ArrayHandleCompositeVector_h
#include <vtkm/cont/ArrayHandle.h>
#include <vtkm/cont/ErrorControlBadValue.h>
#include <vtkm/cont/ErrorControlInternal.h>
#include <vtkm/cont/ErrorBadValue.h>
#include <vtkm/cont/ErrorInternal.h>
#include <vtkm/StaticAssert.h>
#include <vtkm/VecTraits.h>
......@@ -158,7 +158,7 @@ struct CheckArraySizeFunctor {
message << "All input arrays to ArrayHandleCompositeVector must be the same size.\n"
<< "Array " << Index-1 << " has " << a.GetNumberOfValues()
<< ". Expected " << this->ExpectedSize << ".";
throw vtkm::cont::ErrorControlBadValue(message.str().c_str());
throw vtkm::cont::ErrorBadValue(message.str().c_str());
}
}
};
......@@ -282,7 +282,7 @@ public:
VTKM_CONT
PortalType GetPortal() {
throw vtkm::cont::ErrorControlBadValue(
throw vtkm::cont::ErrorBadValue(
"Composite vector arrays are read only.");
}
......@@ -290,7 +290,7 @@ public:
PortalConstType GetPortalConst() const {
if (!this->Valid)
{
throw vtkm::cont::ErrorControlBadValue(
throw vtkm::cont::ErrorBadValue(
"Tried to use an ArrayHandleCompositeHandle without dependent arrays.");
}
return PortalConstType(this->Arrays.StaticTransformCont(
......@@ -302,7 +302,7 @@ public:
vtkm::Id GetNumberOfValues() const {
if (!this->Valid)
{
throw vtkm::cont::ErrorControlBadValue(
throw vtkm::cont::ErrorBadValue(
"Tried to use an ArrayHandleCompositeHandle without dependent arrays.");
}
return this->Arrays.template GetParameter<1>().GetNumberOfValues();
......@@ -310,7 +310,7 @@ public:
VTKM_CONT
void Allocate(vtkm::Id vtkmNotUsed(numberOfValues)) {
throw vtkm::cont::ErrorControlInternal(
throw vtkm::cont::ErrorInternal(
"The allocate method for the composite vector storage should never "
"have been called. The allocate is generally only called by the "
......@@ -321,7 +321,7 @@ public:
VTKM_CONT
void Shrink(vtkm::Id vtkmNotUsed(numberOfValues)) {
throw vtkm::cont::ErrorControlBadValue(
throw vtkm::cont::ErrorBadValue(
"Composite vector arrays are read-only.");
}
......@@ -403,7 +403,7 @@ public:
{
// It may be the case a composite vector could be used for in place
// operations, but this is not implemented currently.
throw vtkm::cont::ErrorControlBadValue(
throw vtkm::cont::ErrorBadValue(
"Composite vector arrays cannot be used for output or in place.");
}
......@@ -413,21 +413,21 @@ public:
// It may be the case a composite vector could be used for output if you
// want the delegate arrays to be resized, but this is not implemented
// currently.
throw vtkm::cont::ErrorControlBadValue(
throw vtkm::cont::ErrorBadValue(
"Composite vector arrays cannot be used for output.");
}
VTKM_CONT
void RetrieveOutputData(StorageType *vtkmNotUsed(storage)) const
{
throw vtkm::cont::ErrorControlBadValue(
throw vtkm::cont::ErrorBadValue(
"Composite vector arrays cannot be used for output.");
}
VTKM_CONT
void Shrink(vtkm::Id vtkmNotUsed(numberOfValues))
{
throw vtkm::cont::ErrorControlBadValue(
throw vtkm::cont::ErrorBadValue(
"Composite vector arrays cannot be resized.");
}
......
......@@ -143,7 +143,7 @@ public:
VTKM_CONT
void Allocate( vtkm::Id vtkmNotUsed(numberOfValues) )
{
throw vtkm::cont::ErrorControlInternal(
throw vtkm::cont::ErrorInternal(
"ArrayHandleConcatenate should not be allocated explicitly. " );
}
......@@ -241,7 +241,7 @@ public:
VTKM_CONT
PortalExecution PrepareForOutput( vtkm::Id vtkmNotUsed(numberOfValues) )
{
throw vtkm::cont::ErrorControlInternal(
throw vtkm::cont::ErrorInternal(
"ArrayHandleConcatenate is derived and read-only. " );
}
......
......@@ -22,7 +22,7 @@
#include <vtkm/cont/ArrayHandle.h>
#include <vtkm/cont/ArrayPortal.h>
#include <vtkm/cont/ErrorControlBadValue.h>
#include <vtkm/cont/ErrorBadValue.h>
namespace vtkm {
namespace exec {
......@@ -164,7 +164,7 @@ public:
vtkm::Id sourceSize = this->SourceArray.GetNumberOfValues();
if(sourceSize%NUM_COMPONENTS != 0)
{
throw vtkm::cont::ErrorControlBadValue(
throw vtkm::cont::ErrorBadValue(
"ArrayHandleGroupVec's source array does not divide evenly into Vecs.");
}
return sourceSize/NUM_COMPONENTS;
......@@ -247,7 +247,7 @@ public:
vtkm::Id sourceSize = this->SourceArray.GetNumberOfValues();
if (sourceSize%NUM_COMPONENTS != 0)
{
throw vtkm::cont::ErrorControlBadValue(
throw vtkm::cont::ErrorBadValue(
"ArrayHandleGroupVec's source array does not divide evenly into Vecs.");
}
return sourceSize/NUM_COMPONENTS;
......@@ -258,7 +258,7 @@ public:
{
if (this->SourceArray.GetNumberOfValues()%NUM_COMPONENTS != 0)
{
throw vtkm::cont::ErrorControlBadValue(
throw vtkm::cont::ErrorBadValue(
"ArrayHandleGroupVec's source array does not divide evenly into Vecs.");
}
return PortalConstExecution(this->SourceArray.PrepareForInput(Device()));
......@@ -269,7 +269,7 @@ public:
{
if (this->SourceArray.GetNumberOfValues()%NUM_COMPONENTS != 0)
{
throw vtkm::cont::ErrorControlBadValue(
throw vtkm::cont::ErrorBadValue(
"ArrayHandleGroupVec's source array does not divide evenly into Vecs.");
}
return PortalExecution(this->SourceArray.PrepareForInPlace(Device()));
......
......@@ -24,7 +24,7 @@
#include <vtkm/cont/ArrayHandleCast.h>
#include <vtkm/cont/ArrayPortal.h>
#include <vtkm/cont/DeviceAdapterAlgorithm.h>
#include <vtkm/cont/ErrorControlBadValue.h>
#include <vtkm/cont/ErrorBadValue.h>
#include <vtkm/cont/TryExecute.h>
#include <vtkm/Assert.h>
......@@ -487,7 +487,7 @@ void DoConvertNumComponentsToOffsets(
if (!success)
{
// Internal error? Maybe need to make a failed to execute error.
throw vtkm::cont::ErrorControlInternal(
throw vtkm::cont::ErrorInternal(
"Failed to run ExclusiveScan on any device.");
}
......
......@@ -23,8 +23,8 @@
#define vtk_m_ArrayHandlePermutation_h
#include <vtkm/cont/ArrayHandle.h>
#include <vtkm/cont/ErrorControlBadType.h>
#include <vtkm/cont/ErrorControlBadValue.h>
#include <vtkm/cont/ErrorBadType.h>
#include <vtkm/cont/ErrorBadValue.h>
namespace vtkm {
namespace exec {
......@@ -153,13 +153,13 @@ public:
VTKM_CONT
void Allocate(vtkm::Id vtkmNotUsed(numberOfValues)) {
throw vtkm::cont::ErrorControlBadType(
throw vtkm::cont::ErrorBadType(
"ArrayHandlePermutation cannot be allocated.");
}
VTKM_CONT
void Shrink(vtkm::Id vtkmNotUsed(numberOfValues)) {
throw vtkm::cont::ErrorControlBadType(
throw vtkm::cont::ErrorBadType(
"ArrayHandlePermutation cannot shrink.");
}
......@@ -234,7 +234,7 @@ public:
PortalExecution PrepareForOutput(vtkm::Id numberOfValues)
{
if (numberOfValues != this->GetNumberOfValues()) {
throw vtkm::cont::ErrorControlBadValue(
throw vtkm::cont::ErrorBadValue(
"An ArrayHandlePermutation can be used as an output array, "
"but it cannot be resized. Make sure the index array is sized "
"to the appropriate length before trying to prepare for output.");
......@@ -246,7 +246,7 @@ public:
// we have to assume the allocation is correct.
if ((numberOfValues > 0) && (this->ValueArray.GetNumberOfValues() < 1))
{
throw vtkm::cont::ErrorControlBadValue(
throw vtkm::cont::ErrorBadValue(
"The value array must be pre-allocated before it is used for the "
"output of ArrayHandlePermutation.");
}
......@@ -265,7 +265,7 @@ public:
VTKM_CONT
void Shrink(vtkm::Id vtkmNotUsed(numberOfValues)) {
throw vtkm::cont::ErrorControlBadType(
throw vtkm::cont::ErrorBadType(
"ArrayHandlePermutation cannot shrink.");
}
......
......@@ -23,8 +23,8 @@
#define vtk_m_cont_ArrayHandleTransform_h
#include <vtkm/cont/ArrayHandle.h>
#include <vtkm/cont/ErrorControlBadType.h>
#include <vtkm/cont/ErrorControlInternal.h>
#include <vtkm/cont/ErrorBadType.h>
#include <vtkm/cont/ErrorInternal.h>
namespace vtkm {
namespace cont {
......@@ -215,13 +215,13 @@ public:
VTKM_CONT
void Allocate(vtkm::Id vtkmNotUsed(numberOfValues)) {
throw vtkm::cont::ErrorControlBadType(
throw vtkm::cont::ErrorBadType(
"ArrayHandleTransform is read only. It cannot be allocated.");
}
VTKM_CONT
void Shrink(vtkm::Id vtkmNotUsed(numberOfValues)) {
throw vtkm::cont::ErrorControlBadType(
throw vtkm::cont::ErrorBadType(
"ArrayHandleTransform is read only. It cannot shrink.");
}
......@@ -374,20 +374,20 @@ public:
VTKM_CONT
PortalExecution PrepareForInPlace(bool &vtkmNotUsed(updateData)) {
throw vtkm::cont::ErrorControlBadType(
throw vtkm::cont::ErrorBadType(
"ArrayHandleTransform read only. "
"Cannot be used for in-place operations.");
}
VTKM_CONT
PortalExecution PrepareForOutput(vtkm::Id vtkmNotUsed(numberOfValues)) {
throw vtkm::cont::ErrorControlBadType(
throw vtkm::cont::ErrorBadType(
"ArrayHandleTransform read only. Cannot be used as output.");
}
VTKM_CONT
void RetrieveOutputData(StorageType *vtkmNotUsed(storage)) const {
throw vtkm::cont::ErrorControlInternal(
throw vtkm::cont::ErrorInternal(
"ArrayHandleTransform read only. "
"There should be no occurance of the ArrayHandle trying to pull "
"data from the execution environment.");
......@@ -395,7 +395,7 @@ public:
VTKM_CONT
void Shrink(vtkm::Id vtkmNotUsed(numberOfValues)) {
throw vtkm::cont::ErrorControlBadType(
throw vtkm::cont::ErrorBadType(
"ArrayHandleTransform read only. Cannot shrink.");
}
......
......@@ -56,12 +56,11 @@ set(headers
DynamicArrayHandle.h
DynamicCellSet.h
Error.h
ErrorControl.h
ErrorControlBadAllocation.h
ErrorControlBadType.h
ErrorControlBadValue.h
ErrorControlInternal.h
ErrorBadAllocation.h
ErrorBadType.h
ErrorBadValue.h
ErrorExecution.h
ErrorInternal.h
Field.h
RuntimeDeviceInformation.h
Storage.h
......
......@@ -214,19 +214,19 @@ public:
if (Traits::GetNumberOfComponents(ids) < numVertices)
{
throw vtkm::cont::ErrorControlBadValue(
throw vtkm::cont::ErrorBadValue(
"Not enough indices given to CellSetSingleType::AddCell.");
}
if (this->NumberOfCellsAdded >= this->PointToCell.Shapes.GetNumberOfValues())
{
throw vtkm::cont::ErrorControlBadValue(
throw vtkm::cont::ErrorBadValue(
"Added more cells then expected.");
}
if (this->ConnectivityAdded+numVertices >
this->PointToCell.Connectivity.GetNumberOfValues())
{
throw vtkm::cont::ErrorControlBadValue(
throw vtkm::cont::ErrorBadValue(
"Connectivity increased passed estimated maximum connectivity.");
}
......@@ -253,7 +253,7 @@ public:
if (this->NumberOfCellsAdded != this->GetNumberOfCells())
{
throw vtkm::cont::ErrorControlBadValue(
throw vtkm::cont::ErrorBadValue(
"Did not add as many cells as expected.");
}
......@@ -289,7 +289,7 @@ public:
this->PointToCell.IndexOffsetsValid = false;
if (offsets.GetNumberOfValues() != 0)
{
throw vtkm::cont::ErrorControlBadValue(
throw vtkm::cont::ErrorBadValue(
"Explicit cell offsets array unexpected size. "
"Use an empty array to automatically generate.");
}
......
......@@ -110,14 +110,14 @@ public:
if (Traits::GetNumberOfComponents(ids) < numVertices)
{
throw vtkm::cont::ErrorControlBadValue(
throw vtkm::cont::ErrorBadValue(
"Not enough indices given to CellSetSingleType::AddCell.");
}
if (this->ConnectivityAdded+numVertices >
this->PointToCell.Connectivity.GetNumberOfValues())
{
throw vtkm::cont::ErrorControlBadValue(
throw vtkm::cont::ErrorBadValue(
"Connectivity increased passed estimated maximum connectivity.");
}
......@@ -125,7 +125,7 @@ public:
{
if (shapeId == vtkm::CELL_SHAPE_EMPTY)
{
throw vtkm::cont::ErrorControlBadValue(
throw vtkm::cont::ErrorBadValue(
"Cannot create cells of type empty.");
}
this->CellShapeAsId = shapeId;
......@@ -136,12 +136,12 @@ public:
{
if (shapeId != this->GetCellShape(0))
{
throw vtkm::cont::ErrorControlBadValue(
throw vtkm::cont::ErrorBadValue(
"Cannot have differing shapes in CellSetSingleType.");
}
if (numVertices != this->NumberOfPointsPerCell)
{
throw vtkm::cont::ErrorControlBadValue(
throw vtkm::cont::ErrorBadValue(
"Inconsistent number of points in cells for CellSetSingleType.");
}
}
......@@ -179,7 +179,7 @@ public:
if (this->ExpectedNumberOfCellsAdded != this->GetNumberOfCells())
{
throw vtkm::cont::ErrorControlBadValue(
throw vtkm::cont::ErrorBadValue(
"Did not add the expected number of cells.");
}
......@@ -246,7 +246,7 @@ private:
{
if (numVertices != vtkm::CellTraits<CellShapeTag>::NUM_POINTS)
{
throw vtkm::cont::ErrorControlBadValue(
throw vtkm::cont::ErrorBadValue(
"Passed invalid number of points for cell shape.");
}
}
......@@ -271,7 +271,7 @@ private:
vtkm::CellTraits<CellShapeTag>::IsSizeFixed(),
numVertices) );
default:
throw vtkm::cont::ErrorControlBadValue(
throw vtkm::cont::ErrorBadValue(
"CellSetSingleType unable to determine the cell type");
}
}
......
......@@ -25,7 +25,7 @@
#include <vtkm/cont/DynamicArrayHandle.h>
#include <vtkm/cont/DynamicCellSet.h>
#include <vtkm/cont/DeviceAdapterAlgorithm.h>
#include <vtkm/cont/ErrorControlBadValue.h>
#include <vtkm/cont/ErrorBadValue.h>
#include <vtkm/cont/Field.h>
namespace vtkm {
......@@ -86,7 +86,7 @@ public:
}
else
{
throw vtkm::cont::ErrorControlBadValue(
throw vtkm::cont::ErrorBadValue(
"No field with requested name: " + name);
}
}
......@@ -145,7 +145,7 @@ public:
}
else
{
throw vtkm::cont::ErrorControlBadValue(
throw vtkm::cont::ErrorBadValue(
"No coordinate system with requested name");
}
}
......@@ -198,7 +198,7 @@ public:
}
else
{
throw vtkm::cont::ErrorControlBadValue("No cell set with requested name");
throw vtkm::cont::ErrorBadValue("No cell set with requested name");
}
}
......
......@@ -280,7 +280,7 @@ private:
dataSet.AddCellSet(cellSet);
}
else
throw vtkm::cont::ErrorControlBadValue("Invalid cell set dimension");
throw vtkm::cont::ErrorBadValue("Invalid cell set dimension");
return dataSet;
}
......
......@@ -161,7 +161,7 @@ private:
dataSet.AddCellSet(cellSet);
}
else
throw vtkm::cont::ErrorControlBadValue("Invalid cell set dimension");
throw vtkm::cont::ErrorBadValue("Invalid cell set dimension");
return dataSet;
}
......
......@@ -26,7 +26,7 @@
#include <vtkm/VecTraits.h>
#include <vtkm/cont/ArrayHandle.h>
#include <vtkm/cont/ErrorControlBadType.h>
#include <vtkm/cont/ErrorBadType.h>
#include <vtkm/cont/StorageListTag.h>
#include <vtkm/cont/internal/DynamicTransform.h>
......@@ -260,7 +260,7 @@ public:
}
/// Returns this array cast to an ArrayHandle object of the given type and
/// storage. Throws \c ErrorControlBadType if the cast does not work. Use
/// storage. Throws \c ErrorBadType if the cast does not work. Use
/// \c IsTypeAndStorage to check if the cast can happen.
///
///
......@@ -272,7 +272,7 @@ public:
detail::DynamicArrayHandleTryCast<Type,Storage>(this->ArrayContainer);
if (downcastArray == nullptr)
{
throw vtkm::cont::ErrorControlBadType("Bad cast of dynamic array.");
throw vtkm::cont::ErrorBadType("Bad cast of dynamic array.");
}
// Technically, this method returns a copy of the \c ArrayHandle. But
// because \c ArrayHandle acts like a shared pointer, it is valid to
......@@ -281,7 +281,7 @@ public:
}
/// Returns this array cast to the given \c ArrayHandle type. Throws \c
/// ErrorControlBadType if the cast does not work. Use \c IsType
/// ErrorBadType if the cast does not work. Use \c IsType
/// to check if the cast can happen.
///
template<typename ArrayHandleType>
......@@ -298,7 +298,7 @@ public:
/// Given a refernce to an ArrayHandle object, casts this array to the
/// ArrayHandle's type and sets the given ArrayHandle to this array. Throws
/// \c ErrorControlBadType if the cast does not work. Use \c
/// \c ErrorBadType if the cast does not work. Use \c
/// ArrayHandleType to check if the cast can happen.
///
/// Note that this is a shallow copy. The data are not copied and a change
......@@ -514,7 +514,7 @@ void DynamicArrayHandleBase<TypeList,StorageList>::
vtkm::ListForEach(tryType, TypeList());
if (!tryType.FoundCast)
{
throw vtkm::cont::ErrorControlBadValue(
throw vtkm::cont::ErrorBadValue(
"Could not find appropriate cast for array in CastAndCall1.");
}
}
......@@ -538,7 +538,7 @@ void DynamicArrayHandleBase<VTKM_DEFAULT_TYPE_LIST_TAG,
vtkm::ListForEach(tryType, VTKM_DEFAULT_TYPE_LIST_TAG());
if (!tryType.FoundCast)
{
throw vtkm::cont::ErrorControlBadValue(
throw vtkm::cont::ErrorBadValue(
"Could not find appropriate cast for array in CastAndCall2.");
}
}
......
......@@ -22,7 +22,7 @@
#include <vtkm/cont/CellSet.h>
#include <vtkm/cont/CellSetListTag.h>
#include <vtkm/cont/ErrorControlBadValue.h>
#include <vtkm/cont/ErrorBadValue.h>
#include <vtkm/cont/internal/DynamicTransform.h>
#include <vtkm/cont/internal/SimplePolymorphicContainer.h>
......@@ -183,7 +183,7 @@ public:
}
/// Returns this cell set cast to the given \c CellSet type. Throws \c
/// ErrorControlBadType if the cast does not work. Use \c IsType to check if
/// ErrorBadType if the cast does not work. Use \c IsType to check if
/// the cast can happen.
///
template<typename CellSetType>
......@@ -193,14 +193,14 @@ public:
detail::DynamicCellSetTryCast<CellSetType>(this->CellSetContainer);
if (cellSetPointer == nullptr)
{
throw vtkm::cont::ErrorControlBadType("Bad cast of dynamic cell set.");
throw vtkm::cont::ErrorBadType("Bad cast of dynamic cell set.");
}
return *cellSetPointer;
}
/// Given a reference to a concrete \c CellSet object, attempt to downcast
/// the contain cell set to the provided type and copy into the given \c
/// CellSet object. Throws \c ErrorControlBadType if the cast does not work.
/// CellSet object. Throws \c ErrorBadType if the cast does not work.
/// Use \c IsType to check if the cast can happen.
///
/// Note that this is a shallow copy. Any data in associated arrays are not
......@@ -344,7 +344,7 @@ void DynamicCellSetBase<CellSetList>::CastAndCall(const Functor &f) const
vtkm::ListForEach(tryCellSet, CellSetList());
if (!tryCellSet.FoundCast)
{
throw vtkm::cont::ErrorControlBadValue(
throw vtkm::cont::ErrorBadValue(
"Could not find appropriate cast for cell set.");
}
}
......
......@@ -17,10 +17,10 @@
// Laboratory (LANL), the U.S. Government retains certain rights in
// this software.
//============================================================================
#ifndef vtk_m_cont_ErrorControlBadAllocation_h
#define vtk_m_cont_ErrorControlBadAllocation_h
#ifndef vtk_m_cont_ErrorBadAllocation_h
#define vtk_m_cont_ErrorBadAllocation_h
#include <vtkm/cont/ErrorControl.h>
#include <vtkm/cont/Error.h>