Exception IO has structure:
Exception IO of {
name: string
....
...}
some other arguments that I do not understand.
Do I have to assign all these. I mean what do I do after this?
exception IO of {inputfile}
I usually define exception and then raise. but I do not even define an exception this way.
All I want to do is raise an exception if input file is not existant. What do I do here?
Thank You
Yes, you have to supply all three fields when creating an exception of type Io. The meanings of the fields are explained in the documentation:
Note that
openInalready raises anIoexception if the file does not exist (with"openIn"as the function, the filename as the name and aSysErras the cause), so there’s no need for you to raise your own.