+2001-01-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
+
+ * backtrace.[ch] (scm_i_display_error): New function.
+
+ * backtrace.c (scm_display_error): Added parameter check and
+ extracted the core functionality into function
+ scm_i_display_error.
+
+ * throw.c (handler_message): Call scm_i_display_error to display
+ the error message.
+
2001-01-23 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
* eval.c (SCM_APPLY): Added # args check for application of
return SCM_UNSPECIFIED;
}
-SCM_DEFINE (scm_display_error, "display-error", 6, 0, 0,
- (SCM stack, SCM port, SCM subr, SCM message, SCM args, SCM rest),
-"")
-#define FUNC_NAME s_scm_display_error
+
+/* The function scm_i_display_error prints out a detailed error message. This
+ * function will be called directly within libguile to signal error messages.
+ * No parameter checks will be performed by scm_i_display_error. Thus, User
+ * code should rather use the function scm_display_error.
+ */
+void
+scm_i_display_error (SCM stack, SCM port, SCM subr, SCM message, SCM args, SCM rest)
{
struct display_error_args a;
struct display_error_handler_data data;
scm_internal_catch (SCM_BOOL_T,
(scm_catch_body_t) display_error_body, &a,
(scm_catch_handler_t) display_error_handler, &data);
+}
+
+
+SCM_DEFINE (scm_display_error, "display-error", 6, 0, 0,
+ (SCM stack, SCM port, SCM subr, SCM message, SCM args, SCM rest),
+ "")
+#define FUNC_NAME s_scm_display_error
+{
+ SCM_VALIDATE_OUTPUT_PORT (2, port);
+
+ scm_i_display_error (stack, port, subr, message, args, rest);
+
return SCM_UNSPECIFIED;
}
#undef FUNC_NAME
+
typedef struct {
int level;
int length;
extern SCM scm_the_last_stack_fluid;
void scm_display_error_message (SCM message, SCM args, SCM port);
+void scm_i_display_error (SCM stack, SCM port, SCM subr, SCM message, SCM args, SCM rest);
SCM scm_display_error (SCM stack, SCM port, SCM subr, SCM message, SCM args, SCM rest);
SCM scm_display_application (SCM frame, SCM port, SCM indent);
SCM scm_display_backtrace (SCM stack, SCM port, SCM first, SCM depth);
scm_display_backtrace (stack, p, SCM_UNDEFINED, SCM_UNDEFINED);
scm_newline (p);
}
- scm_display_error (stack, p, subr, message, parts, rest);
+ scm_i_display_error (stack, p, subr, message, parts, rest);
}
else
{