Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uncaught exception in Topdirs.dir_load #2975

Closed
vicuna opened this issue Sep 29, 2001 · 2 comments
Closed

Uncaught exception in Topdirs.dir_load #2975

vicuna opened this issue Sep 29, 2001 · 2 comments

Comments

@vicuna
Copy link

vicuna commented Sep 29, 2001

Original bug ID: 548
Reporter: administrator
Status: closed
Resolution: fixed
Priority: normal
Severity: feature
Category: ~DO NOT USE (was: OCaml general)

Bug description

Full_Name: Patrick Doane
Version: 3.02
OS: FreeBSD
Submission from: cs6669231-128.austin.rr.com (66.69.231.128)

I would like to be able to load bytecode files using the Topdirs.dir_load
function.
Unfortunately, this doesn't catch the exception Symtable.Error. This function is

not very useful without suitable diagnostic information. As a hack,
I have modified:

  Topdirs.dir_load Format.err_formatter name

into:

  let filename = Filename.temp_file "fort" ".ml" in
  bracket open_out close_out (fun oc ->
    Printf.fprintf oc "#load \"%s\"\n" name
  ) filename;
  let result = Toploop.use_silently Format.err_formatter filename in
  Sys.remove filename;
@vicuna
Copy link
Author

vicuna commented Feb 13, 2002

Comment author: administrator

I would like to be able to load bytecode files using the Topdirs.dir_load
function.
Unfortunately, this doesn't catch the exception Symtable.Error. This function
is
not very useful without suitable diagnostic information.

In the process of allowing to load files from the command line, I've added a
Topdirs.load_file function, which doesn't fail. It is now in CVS.
Notice that it may move to another file in the future, as the right place is yet
to be found.

Jacques Garrigue

@vicuna
Copy link
Author

vicuna commented Feb 13, 2002

Comment author: administrator

Granted as a side-effect :-) (2002-02-08)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant