Do not consider a 3-tuple return value as an exception

Use distinct functions 'add_history_exception' and 'add_history' for
explicitly specifying whether the entry added in the history is
supposed to be an exception or a normal return value of a function
call.