Skip to content
Snippets Groups Projects
Unverified Commit fb10cc8c authored by Daniel Seifert's avatar Daniel Seifert
Browse files

more precise error messages

parent d47885a4
No related branches found
No related tags found
No related merge requests found
......@@ -100,14 +100,14 @@ class Translatable {
break;
default:
throw new \Exception( 'Unknown package type' );
throw new \Exception( sprintf('Unknown package type "%s"', $this->type) );
}
$body = file_get_contents( $url );
$res = json_decode( $body );
if ( ! isset( $res->translations ) || empty( $res->translations ) ) {
throw new \Exception( 'No translations found' );
throw new \Exception( sprintf('No translations found for %s', $this->slug) );
}
$translations = [];
......
......@@ -137,7 +137,7 @@ class Wplang implements PluginInterface, EventSubscriberInterface {
}
}
} catch ( \Exception $e ) {
$this->io->writeError( $e->getMessage() );
$this->io->writeError( ' - ' . $e->getMessage() );
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment