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

Re: [IMP-dev] file not found error



We have IMP_THROW to raise exceptions no matter the mode. Also, TextInput objects should throw exceptions in all modes. In python that should be good enough. In C++ you probably should have a big catch in main that prints out e.what() for exception e.



On Jun 4, 2011, at 4:38 PM, Keren Lasker <> wrote:

> hello -
> 
> Say a program needs to read a parameter file.
> having IMP_USAGE_CHECK to check that the file is open is not optimal because it will not show up in fast mode.
> assuming that i will then just have a simple IF statement, what is the best way to exit the program ?
> a exit(1); seems bad especially if the program should be run though a webserver and we want to notify users on the exact problem.
> 
> did someone have similar problems?
> 
> thanks, keren.
> _______________________________________________
> IMP-dev mailing list
> 
> https://salilab.org/mailman/listinfo/imp-dev