1 #ifndef ROSE_PROCESSSUPPORT_H
2 #define ROSE_PROCESSSUPPORT_H
9 #include <Sawyer/Assert.h>
14 #include "RoseAsserts.h"
16 ROSE_UTIL_API
int systemFromVector(
const std::vector<std::string>& argv);
17 FILE* popenReadFromVector(
const std::vector<std::string>& argv);
19 int pcloseFromVector(FILE* f);
26 :
public std::exception
32 virtual const char *what()
const throw();
51 inline void ROSE_ABORT() __THROW __attribute__ ((__noreturn__));
52 #elif defined(_MSC_VER)
54 inline ROSE_UTIL_API
void ROSE_ABORT(
void) {
throw rose_exception(
"abort"); }
55 #elif defined(__clang__)
58 inline void ROSE_ABORT() throw() {
throw rose_exception(
"abort"); }
64 ROSE_UTIL_API
void ROSE_ABORT(
const char *message);
72 ROSE_UTIL_API
void abortOnFailedAssertion(
const char*,
const char*,
const std::string&,
const char*,
unsigned,
const char*);
75 ROSE_UTIL_API
void exitOnFailedAssertion(
const char*,
const char*,
const std::string&,
const char*,
unsigned,
const char*);
80 ROSE_UTIL_API
void throwOnFailedAssertion(
const char*,
const char*,
const std::string&,
const char*,
unsigned,
const char*);
102 const char *fileName;
104 const char *functionName;
105 FailedAssertion(
const char *mesg,
const char *expr,
const std::string ¬e,
106 const char *fileName,
unsigned lineNumber,
const char *functionName)
107 : std::runtime_error(expr?expr:mesg), mesg(mesg), expr(expr), note(note), fileName(fileName),
108 lineNumber(lineNumber), functionName(functionName) {}
114 #endif // ROSE_PROCESSSUPPORT_H
ROSE_UTIL_API void exitOnFailedAssertion(const char *, const char *, const std::string &, const char *, unsigned, const char *)
Exits with non-zero status for a failed assertion.
Main namespace for the ROSE library.
void(* AssertFailureHandler)(const char *mesg, const char *expr, const std::string ¬e, const char *filename, unsigned linenum, const char *funcname)
Type for user-defined assertion failure handler.
Exception that can be thrown for a failed assertion.
ROSE_UTIL_API void abortOnFailedAssertion(const char *, const char *, const std::string &, const char *, unsigned, const char *)
Aborts for a failed assertion.
ROSE_UTIL_API void throwOnFailedAssertion(const char *, const char *, const std::string &, const char *, unsigned, const char *)
Throws an exception for a failed assertion.
ROSE_UTIL_API void failedAssertionBehavior(Sawyer::Assert::AssertFailureHandler handler)
Property: behavior of failed assertions.