aboutsummaryrefslogtreecommitdiff
path: root/src/support
diff options
context:
space:
mode:
Diffstat (limited to 'src/support')
-rw-r--r--src/support/dom/document_cache.cc4
-rw-r--r--src/support/filesystem_context.cc14
-rw-r--r--src/support/utility.h18
3 files changed, 16 insertions, 20 deletions
diff --git a/src/support/dom/document_cache.cc b/src/support/dom/document_cache.cc
index f814559..1573af8 100644
--- a/src/support/dom/document_cache.cc
+++ b/src/support/dom/document_cache.cc
@@ -1,5 +1,7 @@
#include "document_cache.h"
+#include <stdexcept>
+
namespace InputXSLT {
DomDocumentCache::DomDocumentCache():
@@ -16,7 +18,7 @@ DomDocumentCache::item* DomDocumentCache::get(const std::string& key) {
if ( result.second ) {
return (*(result.first)).second.get();
} else {
- return nullptr;
+ throw std::out_of_range("failed to instantiate DomDocumentCache");
}
} else {
return (*itemIter).second.get();
diff --git a/src/support/filesystem_context.cc b/src/support/filesystem_context.cc
index 34b8950..6ad682f 100644
--- a/src/support/filesystem_context.cc
+++ b/src/support/filesystem_context.cc
@@ -1,6 +1,18 @@
#include "filesystem_context.h"
-#include "support/utility.h"
+namespace {
+
+inline std::string xalanToString(const xalan::XalanDOMString& text) {
+ xalan::CharVectorType castHelper;
+ text.transcode(castHelper);
+
+ return std::string(
+ castHelper.begin(),
+ castHelper.end() - 1
+ );
+}
+
+}
namespace InputXSLT {
diff --git a/src/support/utility.h b/src/support/utility.h
deleted file mode 100644
index 4c63c72..0000000
--- a/src/support/utility.h
+++ /dev/null
@@ -1,18 +0,0 @@
-#ifndef INPUTXSLT_SRC_SUPPORT_UTILITY_H_
-#define INPUTXSLT_SRC_SUPPORT_UTILITY_H_
-
-namespace {
-
-inline std::string xalanToString(const xalan::XalanDOMString& text) {
- xalan::CharVectorType castHelper;
- text.transcode(castHelper);
-
- return std::string(
- castHelper.begin(),
- castHelper.end() - 1
- );
-}
-
-}
-
-#endif // INPUTXSLT_SRC_SUPPORT_UTILITY_H_