Imported Upstream version 2.3+dfsg
[shibboleth/sp.git] / shibsp / util / TemplateParameters.cpp
index f83abd2..520dfc0 100644 (file)
@@ -1,5 +1,5 @@
 /*
- *  Copyright 2001-2007 Internet2
+ *  Copyright 2001-2009 Internet2
  * 
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -21,6 +21,7 @@
  */
 
 #include "internal.h"
+#include "util/PropertySet.h"
 #include "util/TemplateParameters.h"
 
 #include <ctime>
@@ -31,6 +32,16 @@ using namespace shibsp;
 using namespace xmltooling;
 using namespace std;
 
+TemplateParameters::TemplateParameters(const exception* e, const PropertySet* props)
+    : m_exception(e), m_toolingException(dynamic_cast<const XMLToolingException*>(e))
+{
+    setPropertySet(props);
+}
+
+TemplateParameters::~TemplateParameters()
+{
+}
+
 void TemplateParameters::setPropertySet(const PropertySet* props)
 {
     m_props = props;
@@ -48,6 +59,11 @@ void TemplateParameters::setPropertySet(const PropertySet* props)
 #endif
 }
 
+const XMLToolingException* TemplateParameters::getRichException() const
+{
+    return m_toolingException;
+}
+
 const char* TemplateParameters::getParameter(const char* name) const
 {
     if (m_exception) {