MRI-Binding: Catch exceptions in clone constructors
This commit is contained in:
parent
b7a2ba830c
commit
3359451f3a
|
@ -204,7 +204,9 @@ rb_bool_new(bool value)
|
||||||
if (!OBJ_INIT_COPY(self, orig)) /* When would this fail??*/\
|
if (!OBJ_INIT_COPY(self, orig)) /* When would this fail??*/\
|
||||||
return self; \
|
return self; \
|
||||||
Klass *k = getPrivateData<Klass>(orig); \
|
Klass *k = getPrivateData<Klass>(orig); \
|
||||||
setPrivateData(self, new Klass(*k)); \
|
Klass *dup; \
|
||||||
|
GUARD_EXC( dup = new Klass(*k); ) \
|
||||||
|
setPrivateData(self, dup); \
|
||||||
return self; \
|
return self; \
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue