[skip ci] Do not throw plain C string as exception

This commit is contained in:
wmayer
2021-02-06 15:52:21 +01:00
parent bad8257370
commit 0d5b38385c
4 changed files with 11 additions and 10 deletions

View File

@@ -23,6 +23,7 @@
#include "PreCompiled.h"
#ifndef _PreComp_
# include <stdexcept>
#endif
@@ -164,7 +165,7 @@ doc.recompute()
switch(ExceptionType.getValue())
{
case 0: break;
case 1: throw "Test Exception";
case 1: throw std::runtime_error("Test Exception");
case 2: throw Base::RuntimeError("FeatureTestException::execute(): Testexception");
#if 0 // only allow these error types on purpose
case 3: *i=0;printf("%i",*i);break; // seg-fault