[tarantool-patches] Re: [PATCH v2 3/3] box: introduce stacked diagnostic area

Konstantin Osipov kostja at tarantool.org
Wed Aug 28 12:26:07 MSK 2019


* Alexander Turenko <alexander.turenko at tarantool.org> [19/08/27 09:50]:
> > > + * Operation removes reason for the error
> > > + * preceding the savepoint and releases a diagnostic area's
> > > + * reference on the most recent error (diag::last for the
> > > + * rollback beginning). This means that if user code have a
> > > + * pointer and have a reference to an error object from the
> > > + * rollback zone, this pointer and the following "reason" error
> > > + * objects are a valid error list.
> > > + */
> > 
> > BTW, did you check if anyone likes the name 'reason'? I'm not very
> > fond of it, previous error is not always the reason of the current
> > one. I would simply call it 'prev' or 'next'.
> 
> Can you give an example of the error that definitely should be previous
> for another one, but is not its reason?
> 
> It is so for warnings, but this is possibly because they just should not
> be mixed with errors within one stack.

You try to do some useful work and get an error. You unwind, and
get another one during cleanup.


-- 
Konstantin Osipov, Moscow, Russia




More information about the Tarantool-patches mailing list