hello,
I'm programming a simulation of a disk.
I was told to use the try/catch mechanism to catch I/O errors.
This is a part of a function i'm using,
dskfl is an instance of fstream.

PHP Code:
void disk::mountdisk(String sFilename)
{
    
dskfl.open(sFilename.GetBuffer(),ios::in);
    
    if (!
dskfl.is_open())
    {
        
//what to put here?
    
}

    
Sector sec;
    
dskfl >> sec
What do i need to put in the !is_open(), if i want to throw an exception (with the reason of the error!!!) to the caller of the function?

Thanks!