Commit Graph

21 Commits

Author SHA1 Message Date
Kenneth Moreland
eadaf06f0c Set what string in Error::SetMessage
`vtkm::cont::Error` inherits from `std::exception`. As such, it has a
special `what` string that reports an error message in a standard way.
This is particularly useful when a `vtkm::cont::Error` exception remains
uncaught because the system will print the `what` string before
crashing.

Unfortunately, the `what` string was only being set in the `Error`
constructor that took a message. That is a problem for subclasses like
`ErrorCuda` that used the default constructor and then used
`SetMessage`. The `what` string did not get set in this case.

Change the behavior to capture the stack trace in the default
constructor and update the `what` string if a subclass uses
`SetMessage`.
2021-03-29 06:04:22 -06:00
nadavi
325c75fd70 store What as a member var 2019-09-11 16:12:18 -06:00
nadavi
ac0faa3d97 different strack traces for different machines 2019-09-11 16:12:18 -06:00
Nick Davis
f9a1afee69 store StackTrace in Error 2019-09-11 16:12:18 -06:00
nadavi
fbcea82e78 conslidate the license statement 2019-04-17 10:57:13 -06:00
Allison Vacanti
bd337854ec Initial implementation of general logging.
Addresses #291.
2018-10-02 11:37:55 -04:00
Utkarsh Ayachit
cebe6820b7 add vtkm::cont::ErrorFilterExecution
Adding a new exception type `vtkm::cont::ErrorFilterExecution`. Unlike
existing exceptions, when thrown in `TryExecute`, this exception causes
the call to not attempt to execute on any other devices and let it be
thrown so that the application can catch it.
2018-04-03 16:55:03 -04:00
Robert Maynard
ee69c7a4b7 Remove VS2013 workarounds from VTK-m. 2018-02-23 15:39:39 -05:00
Robert Maynard
e49f27a3ac Remove all uses of VTKM_OVERRIDE at instead just use override.
Since VTK-m now requires C++11 it is safe to remove our custom defines
and move to using the keyword directly.
2017-11-02 09:18:15 -04:00
Kenneth Moreland
c3a3184d51 Update copyright for Sandia
Sandia National Laboratories recently changed management from the
Sandia Corporation to the National Technology & Engineering Solutions
of Sandia, LLC (NTESS). The copyright statements need to be updated
accordingly.
2017-09-20 15:33:44 -06:00
Kitware Robot
4ade5f5770 clang-format: apply to the entire tree 2017-05-25 07:51:37 -04:00
David C. Lonie
4807b3c472 Silence warnings about unavoidable weak vtables.
- Exception classes cannot be exported due to MSVC's design decisions.
  See http://stackoverflow.com/questions/24511376. We must leave these
  classes as header only and silence the warnings.
- TransferResource in BufferState.h must remain a header-only class since
  there is no vtkm_interop library to compile the class into.
- The VTKDataSetReader hierarchy must similarly remain header-only since
  there is no vtkm_io library.
- The OptionParser Action classes are part of a header-only utility and
  cannot be easily compiled into a library.
-
2017-04-13 14:06:33 -04:00
Robert Maynard
bd1ff7a5ac Allow vtkm errors to properly work with shared libraries. 2017-01-16 09:17:38 -05:00
David C. Lonie
4a9b8b6f77 Inherit std::exception in vtkm::cont::Error.
Fixes #58.
2017-01-10 12:23:42 -05:00
Kenneth Moreland
860649acf6 Fix error about redefinition of GetMessageA or GetMessageB
If Error.h was loaded before windows.h on windows compilers, then it
happily defined GetMessage and then GetMessageA and GetMessageB. However,
if the load order was reversed, then GetMessage is a macro that changes
it to GetMessageA or GetMessageB and you get an error about the same
method being declared twice.

Get around the problem by not defining GetMessage if it is already
declared as a macro.
2016-04-21 08:23:34 -06:00
Robert Maynard
6b8e7822be The Copyright statement now has all the periods in the correct location. 2015-05-21 10:30:11 -04:00
Kenneth Moreland
ed9cf46a17 Make sure all header wrapper macros start with vtk_m_ rather than vtkm_
We made this change a while ago to help with completion in IDEs.
(Completion was matching a bunch of wrapper macros that were almost
never used anywhere.) Most of the changes are in comments, but there are
a few bad macro definitions.
2014-06-11 10:43:36 -06:00
Robert Maynard
552a8ab160 Work around windows.h clobbering GetMessage.
windows.h uses a macro to forward GetMessage to GetMessageA or
GetMessageW, so to work around that we do the same on windows.
2014-05-19 14:23:30 -04:00
Robert Maynard
2b7a0e0490 revise the header guard naming convention to not conflict with macro names. 2014-03-07 10:22:36 -05:00
Robert Maynard
c80fb9259f Update the initial repository to use the correct indentation style. 2014-02-11 16:20:30 -05:00
Robert Maynard
a94abd7a71 Add in the minimum part of the control env to have a testable array handle. 2014-02-10 15:00:17 -05:00