Abdelrazak Younes wrote:
Bo Peng wrote:
Per the use of exception, I think exception should be used more often
in lyx.
LyX's code base is not exception safe. The code hasn't been written
with exception safety in mind, largely because we weren't proficient
in the use of exceptions. (I certainly include myself in that statement.)
For example, counters are not updated immediately after, say,
an caption is added to InsetInclude. It would be good to have
something like
try
work on inset going on
except updateCounter (+1, or -1)
except updateScreen (partial or all)
except kill me please
Just some random thought.
IMHO exceptions should only be used in _exceptional_ situation because
they bypass the normal function to function communication. I think the
way you want to use them is going to slow down the code significantly.
This is reason why I don't like for example the way exceptions are
misused in the listings code.
Yes, unwinding the stack is very expensive.
Angus