@@ -303,37 +303,37 @@ Severity STEPcomplex::STEPread( int id, int addFileId, class InstMgrBase * insta
303303 in >> ws;
304304 c = in.peek ();
305305 if ( c != ' (' ) {
306- _error.AppendToDetailMsg (
307- " Missing open paren before entity attr values.\n " );
306+ _error.AppendToDetailMsg ( " Missing open paren before entity attr values.\n " );
308307 cout << " ERROR: missing open paren\n " ;
309308 _error.GreaterSeverity ( SEVERITY_INPUT_ERROR );
310309 STEPread_error ( c, 0 , in, currSch );
311310 return _error.severity ();
312311 }
313312
314313 stepc = EntityPart ( typeNm.c_str (), currSch );
315- if ( stepc )
316- stepc->SDAI_Application_instance ::STEPread ( id, addFileId,
317- instance_set, in,
318- currSch );
319- else {
320- cout << " ERROR: complex entity part \" " << typeNm
321- << " \" does not exist.\n " ;
322- _error.AppendToDetailMsg (
323- " Complex entity part of instance does not exist.\n " );
314+ if ( stepc ) {
315+ // WARNING need to seek to the correct position when this is done... how?
316+ stepc->SDAI_Application_instance ::STEPread ( id, addFileId, instance_set, in, currSch );
317+ } else {
318+ cout << " ERROR: complex entity part \" " << typeNm << " \" does not exist." << endl;;
319+ _error.AppendToDetailMsg ( " Complex entity part of instance does not exist.\n " );
324320 _error.GreaterSeverity ( SEVERITY_INPUT_ERROR );
325321 STEPread_error ( c, 0 , in, currSch );
326322 return _error.severity ();
327323 }
328324 in >> ws;
329325 c = in.peek ();
330326 }
331- if ( c != ' )' )
332- cout <<
333- " ERROR: missing ending paren for complex entity instance.\n " ;
334- else {
327+ if ( c != ' )' ) {
328+ cout << " ERROR: missing ending paren for complex entity instance." << endl;
329+ } else {
335330 in.get ( c ); // read the closing paren
336331 }
332+ } else {
333+ _error.AppendToDetailMsg ( " Complex instances must begin with '('. Found '" );
334+ _error.AppendToDetailMsg ( c );
335+ _error.AppendToDetailMsg ( " ' instead.\n " );
336+ _error.GreaterSeverity ( SEVERITY_INPUT_ERROR );
337337 }
338338 return _error.severity ();
339339}
0 commit comments