26 #if defined (HAVE_CONFIG_H)
45 if (
f.is_function_handle ())
49 error (
"onCleanup: no default dispatch for function handle");
58 if (pl !=
nullptr && pl->
length () > 0)
59 warning (
"onCleanup: cleanup action takes parameters");
65 error (
"onCleanup: argument must be a function handle");
85 warning (
"save: unable to save onCleanup variables, skipping");
101 warning (
"save: unable to save onCleanup variables, skipping");
119 warning (
"save: unable to save onCleanup variables, skipping");
177 catch (
const octave::interrupt_exception&)
181 warning (
"onCleanup: interrupt occurred in cleanup action");
183 catch (
const octave::execution_exception& ee)
187 std::string msg = ee.message ();
189 warning (
"onCleanup: error caught while executing cleanup function:\n%s\n",
193 catch (
const octave::exit_exception&)
196 warning (
"onCleanup: exit disabled while executing cleanup function");
201 warning (
"onCleanup: internal error: unhandled exception in cleanup action");
205 DEFUN (onCleanup, args, ,
217 if (args.length () != 1)
size_t length(void) const
void recover_from_exception(void)
void newline(std::ostream &os) const
friend class octave_value
octave_scalar_map scalar_map_value(void) const
bool save_hdf5(octave_hdf5_id loc_id, const char *name, bool save_as_floats)
void call_object_destructor(void)
bool load_hdf5(octave_hdf5_id loc_id, const char *name)
octave_oncleanup(void)=default
void print_raw(std::ostream &os, bool pr_as_read_syntax=false) const
bool save_binary(std::ostream &os, bool save_as_floats)
bool load_ascii(std::istream &is)
bool load_binary(std::istream &is, bool swap, octave::mach_info::float_format fmt)
void print(std::ostream &os, bool pr_as_read_syntax=false)
bool save_ascii(std::ostream &os)
octave::tree_parameter_list * parameter_list(void)
void print_raw(std::ostream &os, bool pr_as_read_syntax=false) const
bool is_defined(void) const
bool is_undefined(void) const
OCTINTERP_API void print_usage(void)
#define DEFUN(name, args_name, nargout_name, doc)
Macro to define a builtin function.
void warning(const char *fmt,...)
void interpreter_try(octave::unwind_protect &frame)
void error(const char *fmt,...)
F77_RET_T const F77_DBLE const F77_DBLE * f
FloatComplex(* fptr)(const FloatComplex &, float, int, octave_idx_type &)
interpreter & __get_interpreter__(const std::string &who)
octave_value_list feval(const char *name, const octave_value_list &args, int nargout)
Evaluate an Octave function (built-in or interpreted) and return the list of result values.
#define DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA(t, n, c)
octave_value::octave_value(const Array< char > &chm, char type) return retval
octave_value_list ovl(const OV_Args &... args)
Construct an octave_value_list with less typing.
sig_atomic_t octave_interrupt_state