now catches bad_alloc exceptions thrown during reloads (=> no need to wrap new in exception handler there)

This was SVN commit r558.
This commit is contained in:
janwas 2004-06-19 14:45:46 +00:00
parent 0eeca662cc
commit 2299573567

View File

@ -467,7 +467,16 @@ if(!(flags & RES_KEY))
if(vtbl->reload)
{
err = vtbl->reload(hd->user, fn);
// catch exception to simplify reload funcs - let them use new()
try
{
err = vtbl->reload(hd->user, fn);
}
catch(std::bad_alloc)
{
err = ERR_NO_MEM;
}
if(err < 0)
{
h_free(h, type);