Skip to content

Commit a2ecc91

Browse files
committed
attempt to fix tests, raise exception instead of dying, use lat < 60 in testFile1.gpx so we can process its elevations
Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
1 parent e0cb88c commit a2ecc91

2 files changed

Lines changed: 17760 additions & 3 deletions

File tree

lib/Service/SRTMGeoTIFFReader.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
*/
1212
namespace OCA\GpxPod\Service;
1313

14+
use Exception;
1415
use OCA\GpxPod\AppInfo\Application;
1516
use OCP\Files\SimpleFS\ISimpleFolder;
1617
use Psr\Log\LoggerInterface;
@@ -617,9 +618,9 @@ private function handleError($method, $message) {
617618
// var_dump($this);
618619
$dump = ob_get_contents();
619620
ob_end_clean();
620-
die("Died: error in $method: $message <pre>$dump</pre>");
621+
throw new Exception("Error in $method: $message <pre>$dump</pre>");
621622
} else {
622-
die();
623+
throw new Exception('Unknown error');
623624
}
624625
}
625626
}

tests/tracks/testFile1.gpx

Lines changed: 17757 additions & 1 deletion
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)