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

CamlIdl - mli file will not be deleted in error case #3069

Closed
vicuna opened this issue Aug 16, 2004 · 0 comments
Closed

CamlIdl - mli file will not be deleted in error case #3069

vicuna opened this issue Aug 16, 2004 · 0 comments

Comments

@vicuna
Copy link

vicuna commented Aug 16, 2004

Original bug ID: 3069
Reporter: administrator
Status: closed
Resolution: fixed
Priority: normal
Severity: minor
Category: -for CamlIDL use https://github.com/xavierleroy/camlidl/issues

Bug description

Full_Name: Shishir Ramam
Version: 3.07+2
OS: Win32
Submission from: adsl-64-171-7-110.dsl.sntc01.pacbell.net (64.171.7.110)

With CamlIdl, if there is a problem with writing the mli file,
the file will not be deleted. It's a minor bug, but a bug all
the same....

The code snippet -
let process_file name =
let pref =
if Filename.check_suffix name ".idl"
then Filename.chop_suffix name ".idl"
else name in
let intf = Normalize.normalize_file name in
eval_constants intf;
let oc = open_out (pref ^ ".mli") in
begin try
gen_mli_file oc intf;
close_out oc
with x ->
close_out oc; remove_file (pref ^ ".ml"); raise x
^^^^^^
Line# 33, this should be "mli"

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