[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Mldonkey-users] Uncommenting the "mp3file not found" message
From: |
Sven Hartge |
Subject: |
[Mldonkey-users] Uncommenting the "mp3file not found" message |
Date: |
Tue, 14 Jan 2003 20:10:20 +0100 |
User-agent: |
tin/1.5.16-20030113 ("Spiders") (UNIX) (Linux/2.4.20-112 (i586)) |
Hi.
I am trying to get rid of the "mp3file not found" message, but since I
don't know any Ocaml, I need a little help here.
My modification is as following:
,----
| let search_info_mp3 filename =
| try
| let tag = Mp3tag.Id3v1.read filename in
| let info = Mp3tag.info filename in
| raise (FormatFound (MP3 (tag, info)))
| with
| | FormatFound _ as e -> raise e
| | x ->
| (* Printf.printf "error while looking for mp3file %s: %s" filename
| (Printexc2.to_string x); print_newline () *)
| ()
`----
This seems to be a switch/case :
try <expression>
with
| case1
| case2
So just removing the second case totally seems not to be appropriate,
since the manual says, an exception is raised if nothing matches.
But () seems to be the "empty" function, so just writing
try <expression>
with
| case1 -> whatever
| case2 -> ()
should be correct, thus just doing nothing on case2.
Am I right, or totally off on this one. (Ocaml is my first functional
language so far, and the syntax is a bit weird to my eyes and mind being
used to C/C++).
S°
--
BOFH excuse #117:
the printer thinks its a router.
- [Mldonkey-users] Uncommenting the "mp3file not found" message,
Sven Hartge <=