Possible Duplicate:
To throw or not to throw exceptions?
For example, in some code like this,
int Type1::LoadFile(QString filePath)
{
QFile infile(filePath);
if (!infile.open(QIODevice::ReadOnly | QIODevice::Text))
return 1 or throw some exception;
QTextStream in(&
What should I do, return 1(which means open file failed) or throw some FileLoadErrorException?
Thanks.