Skip to content

Commit 8f710c4

Browse files
author
André L F S Bacci
committed
Better error message
1 parent c654945 commit 8f710c4

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

scripts/translation/lib/GitLogParser.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,6 @@ static function parseDir( string $gdir , RevcheckFileList $list )
7777
$lcnt++;
7878
if ( $lcnt == 1 && str_starts_with( trim( $proc->line ) , '[skip-revcheck]' ) )
7979
$skip = true;
80-
8180
$proc->next();
8281
}
8382

scripts/translation/lib/RevcheckRun.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,11 @@ private function parseTranslationXml() : void
208208
$this->revData->lang = $this->targetDir;
209209
$this->revData->date = date("r");
210210

211-
$dom = XmlUtil::loadFile( $this->targetDir . '/translation.xml' );
211+
$transfile = $this->targetDir . '/translation.xml';
212+
if ( ! file_exists( $transfile ) )
213+
throw new \Exception("Missing translation.xml file." );
214+
215+
$dom = XmlUtil::loadFile( $transfile );
212216

213217
$tag = $dom->getElementsByTagName( 'intro' )[0] ?? null;
214218
if ( $tag == null )

0 commit comments

Comments
 (0)