diff options
author | Karl Williamson <khw@cpan.org> | 2020-10-20 18:56:00 -0600 |
---|---|---|
committer | Karl Williamson <khw@cpan.org> | 2020-10-22 08:54:05 -0600 |
commit | 56aac0d0cc684bd8b0a40cd0fc08f28e19953b4d (patch) | |
tree | d909f3f96ed47edb341de8e7ac84d7bf8a295307 /autodoc.pl | |
parent | d74c13c00e382643290158595bfba6867da8c199 (diff) | |
download | perl-56aac0d0cc684bd8b0a40cd0fc08f28e19953b4d.tar.gz |
autodoc: Add clarifying info to error messages
Diffstat (limited to 'autodoc.pl')
-rw-r--r-- | autodoc.pl | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/autodoc.pl b/autodoc.pl index e0c09c0662..fdd672408b 100644 --- a/autodoc.pl +++ b/autodoc.pl @@ -354,7 +354,7 @@ Expected: (or 'apidoc_item') EOS - die "Only [$display_flags] allowed in apidoc_item" + die "Only [$display_flags] allowed in apidoc_item:\n$in" if $is_item && $flags =~ /[^$display_flags]/; return ($name, $flags, $ret_type, $is_item, $proto_in_file, @args); @@ -433,7 +433,7 @@ sub autodoc ($$) { # parse a file and extract documentation info $missing{$element_name} = $file; } - die "flag $1 is not legal (for function $element_name (from $file))" + die "flag '$1' is not legal (for function $element_name (from $file))" if $flags =~ / ( [^AabCDdEeFfhiMmNnTOoPpRrSsUuWXxy] ) /x; die "'u' flag must also have 'm' or 'y' flags' for $element_name" @@ -491,7 +491,8 @@ sub autodoc ($$) { # parse a file and extract documentation info unless $element_name; # We accept blank lines between these, but nothing else; - die "apidoc_item lines must immediately follow apidoc lines" + die "apidoc_item lines must immediately follow apidoc lines for " + . " '$element_name' in $file" if $text =~ /\S/; # Override this line with any info in embed.fnc my ($embed_flags, $embed_ret_type, @embed_args) @@ -552,7 +553,7 @@ sub autodoc ($$) { # parse a file and extract documentation info my $is_link_only = ($flags =~ /h/); if ($is_link_only) { if ($file_is_C) { - die "Can't currently handle link with items to it" if @items; + die "Can't currently handle link with items to it:\n$in" if @items; redo; # Don't put anything if C source } |