1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-04-30 03:40:34 +02:00

add exception_on_error optional arg to primitive-load-path

* libguile/init.c (scm_load_startup_files): Use
  scm_c_primitive_load_path.

* libguile/load.c (scm_primitive_load_path): Add an optional arg,
  exception_on_error, which if #f will cause primitive-load-path to just
  return #f if no file is found. This is to help out the semantics of
  try-module-autoload. We can't just catch misc-error, because loading
  the file could raise any exception.
  (scm_c_primitive_load_path): Add the extra arg to
  scm_primitive_load_path.

* libguile/load.h: Adapt scm_primitive_load_path prototype.

* module/ice-9/boot-9.scm (try-module-autoload): Refactor slightly to be
  clearer.
This commit is contained in:
Andy Wingo 2009-06-03 09:48:16 +02:00
parent 1d022387c8
commit 0fb81f95b0
4 changed files with 23 additions and 13 deletions

View file

@ -282,7 +282,7 @@ scm_load_startup_files ()
/* Load Ice-9. */
if (!scm_ice_9_already_loaded)
{
scm_primitive_load_path (scm_from_locale_string ("ice-9/boot-9"));
scm_c_primitive_load_path ("ice-9/boot-9");
/* Load the init.scm file. */
if (scm_is_true (init_path))