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");
157 octave::unwind_protect frame;
176 catch (
const octave::interrupt_exception&)
178 interp.recover_from_exception ();
180 warning (
"onCleanup: interrupt occurred in cleanup action");
182 catch (
const octave::execution_exception& ee)
184 interp.recover_from_exception ();
186 std::string msg = ee.message ();
188 warning (
"onCleanup: error caught while executing cleanup function:\n%s\n",
192 catch (
const octave::exit_exception&)
195 warning (
"onCleanup: exit disabled while executing cleanup function");
200 warning (
"onCleanup: internal error: unhandled exception in cleanup action");
206 DEFUN (onCleanup, args, ,
218 if (args.length () != 1)
OCTINTERP_API 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)
void setfield(const std::string &key, const octave_value &val)
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
OCTAVE_BEGIN_NAMESPACE(octave) static octave_value daspk_fcn
OCTINTERP_API void print_usage(void)
#define DEFUN(name, args_name, nargout_name, doc)
Macro to define a builtin function.
void interpreter_try(unwind_protect &frame)
void warning(const char *fmt,...)
void error(const char *fmt,...)
interpreter & __get_interpreter__(void)
F77_RET_T const F77_DBLE const F77_DBLE * f
FloatComplex(* fptr)(const FloatComplex &, float, int, octave_idx_type &)
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_list ovl(const OV_Args &... args)
Construct an octave_value_list with less typing.
sig_atomic_t octave_interrupt_state