ParticleAPI 3.0.0
Performant particle system API in C++ for interactive graphics
pError.h
Go to the documentation of this file.
1/// PError.h
2///
3/// Copyright 1997-2007, 2022 by David K. McAllister
4///
5/// This file defines the error classes that are thrown.
6
7#ifndef _perror_h
8#define _perror_h
9
10#include <string>
11
12namespace PAPI {
13/// Base type of all exceptions thrown by the Particle System API.
14struct PError_t {
15 std::string ErrMsg;
16 PError_t(const std::string Er) : ErrMsg(Er) {}
17};
18
19struct PErrInNewActionList : PError_t /// An operation was illegally attempted while in the midst of compiling an action list
20{
21 PErrInNewActionList(const std::string Er) : PError_t(Er) {}
22};
23struct PErrNotImplemented : PError_t /// API encountered an unimplemented code path like Bounce for a new
24{
25 PErrNotImplemented(const std::string Er) : PError_t(Er) {}
26};
27struct PErrInternalError : PError_t /// Internal API error (a PASSERT failed)
28{
29 PErrInternalError(const std::string Er) : PError_t(Er) {}
30};
31struct PErrParticleGroup : PError_t /// A particle group call had an error
32{
33 PErrParticleGroup(const std::string Er) : PError_t(Er) {}
34};
35struct PErrActionList : PError_t /// An action list call had an error
36{
37 PErrActionList(const std::string Er) : PError_t(Er) {}
38};
39struct PErrInvalidValue : PError_t /// An invalid value was passed to an API call
40{
41 PErrInvalidValue(const std::string Er) : PError_t(Er) {}
42};
43}; // namespace PAPI
44
45#define PASSERT(x, msg)
46 {
47 if (!(x)) { throw PError_t(msg); }
48 }
49
50#endif
PAPIClasses.h.
Definition: pAPIContext.h:16
An action list call had an error.
Definition: pError.h:36
PErrActionList(const std::string Er)
Definition: pError.h:37
An operation was illegally attempted while in the midst of compiling an action list.
Definition: pError.h:20
PErrInNewActionList(const std::string Er)
Definition: pError.h:21
Internal API error (a PASSERT failed)
Definition: pError.h:28
PErrInternalError(const std::string Er)
Definition: pError.h:29
An invalid value was passed to an API call.
Definition: pError.h:40
PErrInvalidValue(const std::string Er)
Definition: pError.h:41
API encountered an unimplemented code path like Bounce for a new.
Definition: pError.h:24
PErrNotImplemented(const std::string Er)
Definition: pError.h:25
A particle group call had an error.
Definition: pError.h:32
PErrParticleGroup(const std::string Er)
Definition: pError.h:33
Base type of all exceptions thrown by the Particle System API.
Definition: pError.h:14
PError_t(const std::string Er)
Definition: pError.h:16
std::string ErrMsg
Definition: pError.h:15