Skip to content

Commit e119679

Browse files
committed
Remove arg validation in internal helpers
If the inputs are not strings/records, we'll get an error anyway, a few lines later; it just will be slightly less helpful. But only AutoDoc maintainers should ever get to see it, so that's fine.
1 parent e028223 commit e119679

1 file changed

Lines changed: 1 addition & 7 deletions

File tree

gap/AutoDocMainFunction.gi

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,6 @@ InstallGlobalFunction( CreateDefaultChapterData,
4141
function( pkgname )
4242
local chapter_name, default_chapter_record, list_of_types, i;
4343

44-
if not IsString( pkgname ) then
45-
Error( "CreateDefaultChapterData must be called with a possible package name\n" );
46-
fi;
47-
4844
chapter_name := Concatenation( pkgname, "_automatic_generated_documentation" );
4945
default_chapter_record := rec();
5046
list_of_types := Set(
@@ -68,10 +64,8 @@ InstallGlobalFunction( CreateEntitiesPage,
6864

6965
if not IsBound( opt.entities ) then
7066
entities := rec();
71-
elif IsRecord( opt.entities ) then
72-
entities := opt.entities;
7367
else
74-
Error("CreateEntitiesPage: <opt.entities> must be a record");
68+
entities := opt.entities;
7569
fi;
7670

7771
# add book_name unconditionally to the list of entities

0 commit comments

Comments
 (0)