Better diagnostic when a ccRef is open while the previous one is not yet

closed.
This commit is contained in:
Laurent Rineau 2009-07-07 14:00:25 +00:00
parent 83ff44a65a
commit 83b0380dd3
3 changed files with 7 additions and 0 deletions

View File

@ -133,6 +133,8 @@ const char* errorMessage( ErrorNumber n) {
return "Conversion-to-Roman-digits parameter out of bounds";
case AlphaOutOfBoundsError:
return "Conversion-to-Alpha-digit parameter out of bounds";
case RefPageNotClosedError:
return "Previous reference page is not closed";
case UserDefinedError:
return "User defined error message";
}

View File

@ -73,6 +73,7 @@ enum ErrorNumber {
FileReadOpenError,
RomansOutOfBoundsError,
AlphaOutOfBoundsError,
RefPageNotClosedError,
UserDefinedError
};

View File

@ -506,6 +506,10 @@ void handleClassFile( string filename) {
anchor_stream = open_file_for_append_with_path(
tmp_path + current_filepath + macroX( "\\lciAnchorFilename"));
}
if(class_stream != 0) {
printErrorMessage( RefPageNotClosedError);
exit(1);
}
class_stream = open_file_for_write_with_path( tmp_path + class_filename);
current_ostream = class_stream;