Author Topic: PCL: Trying to open a file that does not exist throws pcl::Exception...  (Read 2553 times)

Offline georg.viehoever

  • PTeam Member
  • PixInsight Jedi Master
  • ******
  • Posts: 2132
...instead of  pcl::File::Exception. See code below. Georg
Code: [Select]
try
{
if(!File(sSourceFileName,FileMode::Read).CanRead()){
std::cout<<"stop in if"<<std::endl;
whyNot="Cannot read source file";
return false;
}
} catch (Exception &e) {
// FIXME why is this not File::Exception that is thrown by File()?
std::cout<<"caught "<<e.Message()<<std::endl;
whyNot=e.Message();
return false;
}
will never catch if I use catch (File::Exception &e)
Georg (6 inch Newton, unmodified Canon EOS40D+80D, unguided EQ5 mount)

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
Hi Georg,

This bug is now fixed in PCL 2.0. Thank you for detecting it.
Juan Conejero
PixInsight Development Team
http://pixinsight.com/