diff options
author | Michael Meeks <michael.meeks@novell.com> | 2011-04-04 16:08:25 +0100 |
---|---|---|
committer | Michael Meeks <michael.meeks@novell.com> | 2011-04-04 16:08:25 +0100 |
commit | bc5759ed7d1263b843414396ebd347d74adf3c40 (patch) | |
tree | d88909529a5927d9844d6685da27137b6e2c8ead /solenv/bin | |
parent | aff561a80ce79b4b3ee8cfd0209db29f222ac96f (diff) |
friendlier error on malformed par files
Diffstat (limited to 'solenv/bin')
-rwxr-xr-x | solenv/bin/linkoo | 2 | ||||
-rw-r--r-- | solenv/bin/modules/par2script/work.pm | 5 |
2 files changed, 6 insertions, 1 deletions
diff --git a/solenv/bin/linkoo b/solenv/bin/linkoo index 37a5f1a7b6c8..7c96b6a01b3b 100755 --- a/solenv/bin/linkoo +++ b/solenv/bin/linkoo @@ -35,6 +35,8 @@ use strict; # <http://www.openoffice.org/license.html> # for a copy of the LGPLv3 License. # +# This file substantially, if not wholely written by volunteers, not Oracle +# #************************************************************************* # ends up in program/ooenv diff --git a/solenv/bin/modules/par2script/work.pm b/solenv/bin/modules/par2script/work.pm index a77c69f5dfcb..c9b0bb150bce 100644 --- a/solenv/bin/modules/par2script/work.pm +++ b/solenv/bin/modules/par2script/work.pm @@ -169,7 +169,10 @@ sub collect_definitions $oneitem = $1; $gid = $2; } else { - par2script::exiter::exit_program("ERROR: malformed par file, expecting <token> <gid> but saw '$line'", "test_par_syntax"); + chomp ($line); + my $invalid = $line; + $invalid =~ s/[\s\w]*//g; + par2script::exiter::exit_program("ERROR: malformed par file, invalid character '$invalid', expecting <token> <gid> but saw '$line'", "test_par_syntax"); } # print STDERR "line '$line' -> '$oneitem' '$gid'\n"; |