Prev Next error_message_xam.m Headings

@(@\newcommand{\B}[1]{ {\bf #1} } \newcommand{\R}[1]{ {\rm #1} }@)@
Octave: Cppad Swig Exception Handling: Example and Test
function ok = error_message_xam()
     %
     % load the Cppad Swig library
     m_cppad
     %
     % initialize return variable
     ok = true;
     % -----------------------------------------------------------------------
     ok = false;
     try
          m_cppad.error_message("test message");
     catch
          stored_message = m_cppad.error_message("");
          ok = strcmp(stored_message, "test message");
     end
     return;
end

Input File: build/lib/example/octave/error_message_xam.m