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

This commit is contained in:
jbeder
2008-09-23 21:13:23 +00:00
parent 0b6edc6cfe
commit d51888bc7e

View File

@@ -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
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;
} }
} }
} }