You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Original bug ID: 76 Reporter: administrator Status: closed Resolution: fixed Priority: normal Severity: minor Category: ~DO NOT USE (was: OCaml general)
Calling Dbm.iter on a database which has no entries results in
a Not_found exception being thrown. This is contrary to the specification.
It throws the exception in the call to "firstkey", as specified.
The following minor change should fix the problem (see the last line)
From dbm.ml:
(* Usual iterator )
let iter f t =
let rec walk k =
f k (find t k);
match try Some(nextkey t) with Not_found -> None
with
None -> ()
| Some k -> walk k
in
( walk (firstkey t) -- current line *)
try walk (firstkey t) with Not_found -> ()
Thanks
Dave
The text was updated successfully, but these errors were encountered:
Original bug ID: 76
Reporter: administrator
Status: closed
Resolution: fixed
Priority: normal
Severity: minor
Category: ~DO NOT USE (was: OCaml general)
Bug description
Full_Name: David Clarke
Version: 2.99
OS: Redhat Linix 6.1
Submission from: 203.28.51.70 (203.28.51.70)
Calling Dbm.iter on a database which has no entries results in
a Not_found exception being thrown. This is contrary to the specification.
It throws the exception in the call to "firstkey", as specified.
The following minor change should fix the problem (see the last line)
From dbm.ml:
(* Usual iterator )
let iter f t =
let rec walk k =
f k (find t k);
match try Some(nextkey t) with Not_found -> None
with
None -> ()
| Some k -> walk k
in
( walk (firstkey t) -- current line *)
try walk (firstkey t) with Not_found -> ()
Thanks
Dave
The text was updated successfully, but these errors were encountered: