File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change 22
33namespace PlinCode \KmlParser ;
44
5+ use PlinCode \KmlParser \Exceptions \KmlException ;
56use PlinCode \KmlParser \Exceptions \KmzExtractorException ;
67use ZipArchive ;
78
@@ -46,19 +47,19 @@ public function extractKmlContent(string $path): string
4647 }
4748
4849 /**
49- * Extract all files from KMZ to a directory
50+ * Extract all files from KMZ archive
5051 *
51- * @throws Exception
52+ * @throws KmlException If the KMZ file cannot be found or opened
5253 */
5354 public function extractAllFiles (string $ kmzPath , string $ destination ): array
5455 {
5556 if (! file_exists ($ kmzPath )) {
56- throw new Exception ("KMZ file not found: {$ kmzPath }" );
57+ throw new KmlException ("KMZ file not found: {$ kmzPath }" );
5758 }
5859
5960 $ zip = new ZipArchive ;
6061 if ($ zip ->open ($ kmzPath ) !== true ) {
61- throw new Exception ("Unable to open KMZ file: {$ kmzPath }" );
62+ throw new KmlException ("Unable to open KMZ file: {$ kmzPath }" );
6263 }
6364
6465 if (! file_exists ($ destination )) {
You can’t perform that action at this time.
0 commit comments