@@ -28,7 +28,7 @@ int main( int argc, char * argv[] ) {
2828 Severity readSev = sfile.Error ().severity ();
2929 if ( readSev != SEVERITY_NULL ) {
3030 sfile.Error ().PrintContents (cout);
31- abort ( );
31+ exit (EXIT_FAILURE );
3232 }
3333
3434 // Keeps track of the last processed ent id
@@ -45,7 +45,7 @@ int main( int argc, char * argv[] ) {
4545 const AggrTypeDescriptor* atd = (const AggrTypeDescriptor*) attrDesc->DomainType ();
4646 if ( !( atd->Bound1Type () == bound_constant ) || !( atd->Bound2Type () == bound_runtime ) ) {
4747 cerr << " Invalid bounds. Exiting." << endl;
48- abort ( );
48+ exit (EXIT_FAILURE );
4949 }
5050 cout << " -- bound 1 is a constant (" << atd->Bound1 () << " ). bound 2 depends upon the instance." << endl;
5151 descAggrCount++;
@@ -54,7 +54,7 @@ int main( int argc, char * argv[] ) {
5454 }
5555 if ( descAggrCount != 1 ) {
5656 cerr << " Expected 1 aggregate attribute descriptor, found " << descAggrCount <<" . Exiting." << endl;
57- abort ( );
57+ exit (EXIT_FAILURE );
5858 }
5959
6060
@@ -72,11 +72,11 @@ int main( int argc, char * argv[] ) {
7272 cout << " Ent #" << id << " - " ;
7373 if ( cnt != 3 ) {
7474 cerr << " Expected 3 attributes, found " << cnt << " . Exiting." << endl;
75- abort ( );
75+ exit (EXIT_FAILURE );
7676 }
7777 if ( id > 2 ) {
7878 cerr << " Expected 2 instances, found " << cnt << " . Exiting." << endl;
79- abort ( );
79+ exit (EXIT_FAILURE );
8080 }
8181 // loop over the attributes
8282 for ( int i = 0 ; i < cnt; i++ ) {
@@ -87,7 +87,7 @@ int main( int argc, char * argv[] ) {
8787 if ( ( ( id == 1 ) && ( b2 != 3 ) ) || ( ( id == 2 ) && ( b2 != 5 ) ) ) {
8888 cerr << " Instance " << id << " : value " << b2 << " is invalid for bound 2." ;
8989 cerr << " Expecting 3 for instance #1 or 5 for #2." << endl;
90- abort ( );
90+ exit (EXIT_FAILURE );
9191 }
9292 }
9393 }
@@ -98,12 +98,12 @@ int main( int argc, char * argv[] ) {
9898 while ( aggrNode != 0 ) {
9999 if ( node >= b2 ) {
100100 cerr << " Instance " << id << " : Number of values exceeds upper bound. Exiting." << endl;
101- abort ( );
101+ exit (EXIT_FAILURE );
102102 }
103103 cout << aggrNode->value << " " ;
104104 if ( aggrValues[id-1 ][node] != aggrNode->value ) {
105105 cerr << " Instance " << id << " : aggregate value " << aggrNode->value << " at index " << node << " is incorrect. Exiting." << endl;
106- abort ( );
106+ exit (EXIT_FAILURE );
107107 }
108108 aggrNode = (IntNode*) aggrNode->NextNode ();
109109 node++;
@@ -112,7 +112,7 @@ int main( int argc, char * argv[] ) {
112112
113113 if ( instAggrCnt != 1 ) {
114114 cerr << " Expected 1 aggregate attribute in this instance, found " << instAggrCnt << " . Exiting." << endl;
115- abort ( );
115+ exit (EXIT_FAILURE );
116116 }
117117
118118
0 commit comments