summaryrefslogtreecommitdiff
path: root/tests/test_xpath_variables.cpp
diff options
context:
space:
mode:
authorArseny Kapoulkine <arseny.kapoulkine@gmail.com>2015-04-11 22:37:38 -0700
committerArseny Kapoulkine <arseny.kapoulkine@gmail.com>2015-04-11 22:40:30 -0700
commit814443b147e6159a0ad2842fabc1288ec6a0ee24 (patch)
treea56d1bb24f33552d19d163e292c15ed34c8ce149 /tests/test_xpath_variables.cpp
parent03ea04c32a6c1961d28d3b5dc66dad906dfc8ca6 (diff)
Fix exception type for out-of-memory for XPath variables
When parsing XPath variables, we need to perform a heap allocation; if it fails, an xpath_exception instead of bad_alloc used to be thrown. Now we throw the exception of a correct type so that xpath_exception means 'parsing error'.
Diffstat (limited to 'tests/test_xpath_variables.cpp')
-rw-r--r--tests/test_xpath_variables.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/test_xpath_variables.cpp b/tests/test_xpath_variables.cpp
index 53b40cf..7a099c4 100644
--- a/tests/test_xpath_variables.cpp
+++ b/tests/test_xpath_variables.cpp
@@ -293,7 +293,7 @@ TEST(xpath_variables_long_name_out_of_memory)
CHECK_FORCE_FAIL("Expected exception");
}
- catch (const xpath_exception&)
+ catch (const std::bad_alloc&)
{
}
#endif