From d51888bc7e101bf31efb042c7804ff89c6f0eb6c Mon Sep 17 00:00:00 2001 From: jbeder Date: Tue, 23 Sep 2008 21:13:23 +0000 Subject: [PATCH] Fixed a problem where you lose the exception type on rethrow. --- src/map.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/map.cpp b/src/map.cpp index facb537..89f5b70 100644 --- a/src/map.cpp +++ b/src/map.cpp @@ -80,10 +80,10 @@ namespace YAML } m_data[pKey] = pValue; - } catch(Exception& e) { + } catch(Exception&) { delete pKey; delete pValue; - throw e; + throw; } } } @@ -131,11 +131,11 @@ namespace YAML throw ParserException(nextToken.line, nextToken.column, ErrorMsg::END_OF_MAP_FLOW); m_data[pKey] = pValue; - } catch(Exception& e) { + } catch(Exception&) { // clean up and rethrow delete pKey; delete pValue; - throw e; + throw; } } }