Skip to content

Commit 0bf4da0

Browse files
Throw exception directory does not exist
1 parent 46508de commit 0bf4da0

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
fontawesome-svgs/
1+
fontawesome-svgs/
2+
.tinkerwell

src/FontAwesomeSVG.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ class FontAwesomeSVG {
55
public $svg_dir;
66

77
public function __construct($svg_dir) {
8+
if( !is_dir($svg_dir) ) {
9+
throw new Exception("Directory $svg_dir does not exist");
10+
}
11+
812
$this->svg_dir = $svg_dir;
913
}
1014

0 commit comments

Comments
 (0)