Commit 3ed09b89 authored by Jesse Beder's avatar Jesse Beder
Browse files

Fixed a problem where you lose the exception type on rethrow.

parent 1406b840
...@@ -80,10 +80,10 @@ namespace YAML ...@@ -80,10 +80,10 @@ namespace YAML
} }
m_data[pKey] = pValue; m_data[pKey] = pValue;
} catch(Exception& e) { } catch(Exception&) {
delete pKey; delete pKey;
delete pValue; delete pValue;
throw e; throw;
} }
} }
} }
...@@ -131,11 +131,11 @@ namespace YAML ...@@ -131,11 +131,11 @@ namespace YAML
throw ParserException(nextToken.line, nextToken.column, ErrorMsg::END_OF_MAP_FLOW); throw ParserException(nextToken.line, nextToken.column, ErrorMsg::END_OF_MAP_FLOW);
m_data[pKey] = pValue; m_data[pKey] = pValue;
} catch(Exception& e) { } catch(Exception&) {
// clean up and rethrow // clean up and rethrow
delete pKey; delete pKey;
delete pValue; delete pValue;
throw e; throw;
} }
} }
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment