diff --git a/src/Translatable.php b/src/Translatable.php index 855dfb887212334fd012e2850cf352deb46ca4bf..ec5add6ed433a6d62004e995cecaf68fd0632d4a 100644 --- a/src/Translatable.php +++ b/src/Translatable.php @@ -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 = []; diff --git a/src/Wplang.php b/src/Wplang.php index 2b074c89fb3dc805ebf9a93fbf74e198d7309a40..b376b4d26655d0ec8c95a05f860d7d8093b32946 100644 --- a/src/Wplang.php +++ b/src/Wplang.php @@ -137,7 +137,7 @@ class Wplang implements PluginInterface, EventSubscriberInterface { } } } catch ( \Exception $e ) { - $this->io->writeError( $e->getMessage() ); + $this->io->writeError( ' - ' . $e->getMessage() ); } }