mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-11-16 01:22:18 +03:00
Action: make sure that null constructor is not used
This commit is contained in:
@@ -64,17 +64,23 @@ namespace actions {
|
||||
namespace transformations {
|
||||
|
||||
|
||||
class TransformationDoesNotExist: public std::exception {
|
||||
class TransformationDoesNotExist : public std::exception {
|
||||
public:
|
||||
explicit TransformationDoesNotExist(const char *name)
|
||||
: m_transformation(name)
|
||||
{ }
|
||||
|
||||
explicit TransformationDoesNotExist(const std::string& name)
|
||||
: m_transformation(name)
|
||||
{ }
|
||||
|
||||
virtual const char* what() const throw() {
|
||||
return std::string("Transformation not found: " + m_transformation + \
|
||||
". Make sure that the new transformation is registered at: " + \
|
||||
"transformation.cc").c_str();
|
||||
}
|
||||
virtual ~TransformationDoesNotExist() throw (){}
|
||||
|
||||
virtual const char* what() const throw() {
|
||||
return strdup(std::string("Transformation not found: " + m_transformation + \
|
||||
". Make sure that the new transformation is registered at: " + \
|
||||
"transformation.cc").c_str());
|
||||
}
|
||||
|
||||
private:
|
||||
std::string m_transformation;
|
||||
|
||||
@@ -34,7 +34,7 @@ namespace transformations {
|
||||
class TrimLeft : public Trim {
|
||||
public:
|
||||
TrimLeft()
|
||||
: Trim("t:trimLeft")
|
||||
: Action("t:trimLeft")
|
||||
{ }
|
||||
|
||||
void execute(const Transaction *t,
|
||||
|
||||
@@ -34,7 +34,7 @@ namespace transformations {
|
||||
class TrimRight : public Trim {
|
||||
public:
|
||||
TrimRight()
|
||||
: Trim("t:trimRight")
|
||||
: Action("t:trimRight")
|
||||
{ }
|
||||
|
||||
void execute(const Transaction *t,
|
||||
|
||||
Reference in New Issue
Block a user