diff options
author | bhaddow <bhaddow@1f5c12ca-751b-0410-a591-d2e778427230> | 2010-10-15 13:00:18 +0400 |
---|---|---|
committer | bhaddow <bhaddow@1f5c12ca-751b-0410-a591-d2e778427230> | 2010-10-15 13:00:18 +0400 |
commit | 2dc951b062da31dbaedc897e4855cd4d503383e0 (patch) | |
tree | 7dfd2c5c6c89bdee42e4288dcbfb6d5a6cca9e63 /scripts/training/clean-corpus-n.perl | |
parent | a1ab166692079e7624cfa0d5890ac46bdb65e6c0 (diff) |
More informative error messages
git-svn-id: https://mosesdecoder.svn.sourceforge.net/svnroot/mosesdecoder/trunk@3625 1f5c12ca-751b-0410-a591-d2e778427230
Diffstat (limited to 'scripts/training/clean-corpus-n.perl')
-rwxr-xr-x | scripts/training/clean-corpus-n.perl | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/scripts/training/clean-corpus-n.perl b/scripts/training/clean-corpus-n.perl index e175a92fc..df77e5f89 100755 --- a/scripts/training/clean-corpus-n.perl +++ b/scripts/training/clean-corpus-n.perl @@ -46,6 +46,8 @@ if (-e $l1input) { $opn = $l1input; } elsif (-e $l1input.".gz") { $opn = "zcat $l1input.gz |"; +} else { + die "Error: $l1input does not exist"; } open(F,$opn) or die "Can't open '$opn'"; $opn = undef; @@ -54,7 +56,10 @@ if (-e $l2input) { $opn = $l2input; } elsif (-e $l2input.".gz") { $opn = "zcat $l2input.gz |"; +} else { + die "Error: $l2input does not exist"; } + open(E,$opn) or die "Can't open '$opn'"; open(FO,">$out.$l1") or die "Can't write $out.$l1"; |