changed do_throw() to clear the class stack when the exception is empty
This commit is contained in:
parent
3d4e161a5f
commit
c230355e90
@ -2075,6 +2075,10 @@ static HCL_INLINE int do_throw (hcl_t* hcl, hcl_oop_t val, hcl_ooi_t ip)
|
|||||||
|
|
||||||
if (HCL_EXSTACK_ISEMPTY(hcl))
|
if (HCL_EXSTACK_ISEMPTY(hcl))
|
||||||
{
|
{
|
||||||
|
/* the exception stack is empty.
|
||||||
|
* clear the class stack if it is not empty */
|
||||||
|
while (!HCL_CLSTACK_ISEMPTY(hcl)) HCL_CLSTACK_POP (hcl);
|
||||||
|
|
||||||
if (hcl->active_function->dbgi != hcl->_nil)
|
if (hcl->active_function->dbgi != hcl->_nil)
|
||||||
{
|
{
|
||||||
hcl_dbgi_t* dbgi;
|
hcl_dbgi_t* dbgi;
|
||||||
@ -2094,6 +2098,7 @@ static HCL_INLINE int do_throw (hcl_t* hcl, hcl_oop_t val, hcl_ooi_t ip)
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* TODO: unwind the nested class stack */
|
||||||
/* must rewind context */
|
/* must rewind context */
|
||||||
HCL_EXSTACK_POP_TO(hcl, catch_ctx, catch_ip);
|
HCL_EXSTACK_POP_TO(hcl, catch_ctx, catch_ip);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user