changeset 6000:fbe7ccb47f62

[project @ 2006-09-26 15:43:44 by jwe]
author jwe
date Tue, 26 Sep 2006 15:43:44 +0000
parents 1aa6a35a855d
children d45cb743ff2e
files src/error.cc
diffstat 1 files changed, 42 insertions(+), 42 deletions(-) [+]
line wrap: on
line diff
--- a/src/error.cc
+++ b/src/error.cc
@@ -429,6 +429,48 @@
     }
 }
 
+static void
+error_2 (const char *id, const char *fmt, va_list args)
+{
+  int init_state = error_state;
+
+  error_1 (std::cerr, "error", id, fmt, args);
+
+  if ((interactive || forced_interactive)
+      && Vdebug_on_error && init_state == 0
+      && octave_call_stack::caller_user_script_or_function ())
+    {
+      unwind_protect_bool (Vdebug_on_error);
+      Vdebug_on_error = false;
+
+      pr_where ("error");
+
+      error_state = 0;
+
+      do_keyboard (octave_value_list ());
+
+      unwind_protect::run ();
+    }
+}
+
+void
+error (const char *fmt, ...)
+{
+  va_list args;
+  va_start (args, fmt);
+  error_2 ("", fmt, args);
+  va_end (args);
+}
+
+void
+error_with_id (const char *id, const char *fmt, ...)
+{
+  va_list args;
+  va_start (args, fmt);
+  error_2 (id, fmt, args);
+  va_end (args);
+}
+
 static int
 check_state (const std::string& state)
 {
@@ -570,48 +612,6 @@
   va_end (args);
 }
 
-static void
-error_2 (const char *id, const char *fmt, va_list args)
-{
-  int init_state = error_state;
-
-  error_1 (std::cerr, "error", id, fmt, args);
-
-  if ((interactive || forced_interactive)
-      && Vdebug_on_error && init_state == 0
-      && octave_call_stack::caller_user_script_or_function ())
-    {
-      unwind_protect_bool (Vdebug_on_error);
-      Vdebug_on_error = false;
-
-      pr_where ("error");
-
-      error_state = 0;
-
-      do_keyboard (octave_value_list ());
-
-      unwind_protect::run ();
-    }
-}
-
-void
-error (const char *fmt, ...)
-{
-  va_list args;
-  va_start (args, fmt);
-  error_2 ("", fmt, args);
-  va_end (args);
-}
-
-void
-error_with_id (const char *id, const char *fmt, ...)
-{
-  va_list args;
-  va_start (args, fmt);
-  error_2 (id, fmt, args);
-  va_end (args);
-}
-
 void
 parse_error (const char *fmt, ...)
 {