From 22cbef9c75aeb58d6c88c9b736526cb9d52a52a2 Mon Sep 17 00:00:00 2001 From: Adrian Kummerländer Date: Mon, 28 Apr 2014 20:03:06 +0200 Subject: Adapted read-directory tree construction to match the other functions * throwing std::out_of_range exception from DomDocumentCache::get instead of returning nullptr in case of a problem * moved xalanToString method back into FilesystemContext compilation unit as is only needed there --- src/support/dom/document_cache.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/support/dom') 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 + 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(); -- cgit v1.2.3