openexr-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Openexr-devel] validity check on files


From: Drew Hess
Subject: Re: [Openexr-devel] validity check on files
Date: Tue, 7 Oct 2003 09:51:27 -0700 (PDT)

Hi James,

This should catch any exception generated by InputFile:

try
{
    InputFile file (fileName);
}
catch (Iex::BaseExc & e)
{
    //
    // do something with exception.
    //
}


Does that not work for you?

It think it would be useful to have some sort of static "magic" function 
to quickly check whether a file looks like a valid OpenEXR file without 
throwing an exception, but there isn't one at the moment.


-dwh-



On Fri, 3 Oct 2003, James McPhail wrote:

> I hope this hasn't been touched upon in a previous thread.
> 
> Is there functionality in the toolkit for determining if an "InputFile" 
> is bogus? Specifically, can the toolkit determine, when passed a file 
> name, that the given file is not of the EXR format?
> 
> I had initially wanted to try
> 
> InputFile file(fileName);
> 
> then had hoped there would be some flag or function call on this 'file' 
> variable or its associated header which would indicate that it was not a 
> valid file, however this InputFile constructor throws an exception 
> (which I couldn't manage to catch) and then crashes.
> 
> Any help would be appreciated.
> 
> James
> 
> 
> 
> 
> _______________________________________________
> Openexr-devel mailing list
> address@hidden
> http://mail.nongnu.org/mailman/listinfo/openexr-devel
> 





reply via email to

[Prev in Thread] Current Thread [Next in Thread]