Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplify some 'Error' invocations #34

Merged
merged 1 commit into from
Dec 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions gap/carat.gi
Original file line number Diff line number Diff line change
Expand Up @@ -569,7 +569,7 @@
local input;
input := InputTextFile( filename );
if input = fail then
Error( Concatenation( "File ", filename, " not found." ) );
Error( "File ", filename, " not found." );

Check warning on line 572 in gap/carat.gi

View check run for this annotation

Codecov / codecov/patch

gap/carat.gi#L572

Added line #L572 was not covered by tests
fi;
Print( ReadAll( input ) );
CloseStream( input );
Expand Down Expand Up @@ -615,7 +615,7 @@
# find executable
program := Filename( CARAT_BIN_DIR, command );
if program = fail then
Error( Concatenation( "Carat program ", command, " not found." ) );
Error( "Carat program ", command, " not found." );

Check warning on line 618 in gap/carat.gi

View check run for this annotation

Codecov / codecov/patch

gap/carat.gi#L618

Added line #L618 was not covered by tests
fi;

# execute command
Expand All @@ -630,13 +630,12 @@
CaratShowFile( outfile ); # contains usage advice
else
CaratShowFile( outfile );
Error( Concatenation( "Carat program ", command,
" failed with error code ", String(err), " and the above output" ) );
Error( "Carat program ", command,
" failed with error code ", err, " and the above output" );

Check warning on line 634 in gap/carat.gi

View check run for this annotation

Codecov / codecov/patch

gap/carat.gi#L633-L634

Added lines #L633 - L634 were not covered by tests
fi;
fi;
if err < 0 and args <> "-h" then
Error( Concatenation( "Carat program ", command,
" failed with error code ", String(err) ) );
Error( "Carat program ", command, " failed with error code ", err );

Check warning on line 638 in gap/carat.gi

View check run for this annotation

Codecov / codecov/patch

gap/carat.gi#L638

Added line #L638 was not covered by tests
fi;

end );
Expand Down
8 changes: 3 additions & 5 deletions gap/methods.gi
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,7 @@
command := "Bravais_catalog";
program := Filename( CARAT_BIN_DIR, command );
if program = fail then
Error( Concatenation( "Carat program ", command, " not found." ) );
Error( "Carat program ", command, " not found." );

Check warning on line 464 in gap/methods.gi

View check run for this annotation

Codecov / codecov/patch

gap/methods.gi#L464

Added line #L464 was not covered by tests
fi;

# execute command
Expand All @@ -474,8 +474,7 @@
CaratShowFile( resfile ); # contains usage advice
fi;
if err < 0 then
Error( Concatenation( "Carat program ", command,
" failed with error code ", String(err) ) );
Error( "Carat program ", command, " failed with error code ", err );

Check warning on line 477 in gap/methods.gi

View check run for this annotation

Codecov / codecov/patch

gap/methods.gi#L477

Added line #L477 was not covered by tests
fi;

# read Carat result from file, and remove temporary file
Expand Down Expand Up @@ -564,8 +563,7 @@
# get the QClass name
str := CaratReadLine( input );
if str{[1..22]} <> "Name of this Q-class: " then
Error( Concatenation(
"Carat program Q_catalog failed with message\n", str ) );
Error( "Carat program Q_catalog failed with message\n", str );

Check warning on line 566 in gap/methods.gi

View check run for this annotation

Codecov / codecov/patch

gap/methods.gi#L566

Added line #L566 was not covered by tests
fi;
res.qclass := str{[23..Length(str)-1]};

Expand Down