[uim-commit] r2009 - branches/r5rs/sigscheme
yamaken at freedesktop.org
yamaken at freedesktop.org
Sat Nov 5 10:17:00 PST 2005
Author: yamaken
Date: 2005-11-05 10:16:56 -0800 (Sat, 05 Nov 2005)
New Revision: 2009
Modified:
branches/r5rs/sigscheme/error.c
branches/r5rs/sigscheme/operations-srfi23.c
branches/r5rs/sigscheme/sigschemeinternal.h
Log:
* This commit makes the testing framework workable
* sigscheme/sigschemeinternal.h
- (Scm_ThrowException): New function decl
* sigscheme/error.c
- (throw_exception): Rename to Scm_ThrowException()
- (Scm_ThrowException):
* Renamed from throw_exception()
* Make global
- (SigScm_Error, SigScm_ErrorObj, Scm_ErrorObj): Follow the renaming
* sigscheme/operations-srfi23.c
- (ScmOp_SRFI23_error): Throw exception instead of exit(3)
Modified: branches/r5rs/sigscheme/error.c
===================================================================
--- branches/r5rs/sigscheme/error.c 2005-11-05 18:04:30 UTC (rev 2008)
+++ branches/r5rs/sigscheme/error.c 2005-11-05 18:16:56 UTC (rev 2009)
@@ -62,12 +62,11 @@
/*=======================================
File Local Function Declarations
=======================================*/
-static void throw_exception(ScmObj errorobj) SCM_NORETURN;
/*=======================================
Function Implementations
=======================================*/
-static void throw_exception(ScmObj errorobj)
+void Scm_ThrowException(ScmObj errorobj)
{
#if SCM_EXCEPTION_HANDLING
if (FALSEP(CURRENT_EXCEPTION_CONTINUATION())) {
@@ -118,7 +117,7 @@
}
/* FIXME: this errorobj is OK? */
- throw_exception(Scm_NewStringCopying("ERROR"));
+ Scm_ThrowException(Scm_NewStringCopying("ERROR"));
}
/* Obsolete. */
@@ -132,7 +131,7 @@
}
/* FIXME: this errorobj is OK? */
- throw_exception(Scm_NewStringCopying("ERROR"));
+ Scm_ThrowException(Scm_NewStringCopying("ERROR"));
}
/* This function obsoletes SigScm_ErrorObj(). */
@@ -146,7 +145,7 @@
}
/* FIXME: this errorobj is OK? */
- throw_exception(Scm_NewStringCopying("ERROR"));
+ Scm_ThrowException(Scm_NewStringCopying("ERROR"));
}
void SigScm_ShowBacktrace(void)
Modified: branches/r5rs/sigscheme/operations-srfi23.c
===================================================================
--- branches/r5rs/sigscheme/operations-srfi23.c 2005-11-05 18:04:30 UTC (rev 2008)
+++ branches/r5rs/sigscheme/operations-srfi23.c 2005-11-05 18:16:56 UTC (rev 2009)
@@ -101,12 +101,7 @@
SigScm_ErrorNewline();
}
- /* FIXME: backtrace should be printed by outermost exception handler */
- if (SigScm_DebugCategories() & SCM_DBG_BACKTRACE)
- SigScm_ShowBacktrace();
-
- /* FIXME: throw an exception instead of exiting */
- exit(EXIT_FAILURE);
+ Scm_ThrowException(args);
/* NOTREACHED */
return SCM_UNDEF;
}
Modified: branches/r5rs/sigscheme/sigschemeinternal.h
===================================================================
--- branches/r5rs/sigscheme/sigschemeinternal.h 2005-11-05 18:04:30 UTC (rev 2008)
+++ branches/r5rs/sigscheme/sigschemeinternal.h 2005-11-05 18:16:56 UTC (rev 2009)
@@ -361,6 +361,7 @@
ScmObj Scm_tailcall(ScmObj proc, ScmObj args, ScmEvalState *eval_state);
/* error.c */
+void Scm_ThrowException(ScmObj errorobj) SCM_NORETURN;
void SigScm_ShowErrorHeader(void);
void Scm_ErrorObj(const char *func_name, const char *msg, ScmObj obj);
More information about the uim-commit
mailing list