File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 109109 (rel [this other]
110110 (if (satisfies? IFSPath other)
111111 (rel- path this other)
112- (throw " Second argument must satisfy IFSPath" )))
112+ (throw [::AssertionException " Second argument must satisfy IFSPath" ] )))
113113
114114 (abs [this]
115115 (path/- abs pathz))
157157 (rel [this other]
158158 (if (satisfies? IFSPath other)
159159 (rel- path this other)
160- (throw " Second argument must satisfy IFSPath" )))
160+ (throw [::AssertionException " Second argument must satisfy IFSPath" ] )))
161161
162162 (abs [this]
163163 (path/- abs pathz))
217217 (cond
218218 (path/- file ? x) (- > File x)
219219 (not (path/- exists? x)) (- > File x)
220- :else (throw (str " A non-file object exists at path: " x)))))
220+ :else (throw [::NotAFileException (str " A non-file object exists at path: " x)] ))))
221221
222222(defn dir
223223 " Returns a dir if the path is a dir or does not exist. If a different filesystem object exists at the path an error will be thrown."
226226 (cond
227227 (path/- dir ? x) (- > Dir x)
228228 (not (path/- exists? x)) (- > Dir x)
229- :else (throw (str " A non-dir object exists at path: " x)))))
229+ :else (throw [::NotADirectoryException (str " A non-dir object exists at path: " x)] ))))
230230
231231(defn fspath
232232 " Returns either a File or Dir if they exist at the path"
235235 (cond
236236 (path/- file ? x) (- > File x)
237237 (path/- dir ? x) (- > Dir x)
238- :else (throw (str " No file or directory at path: " x)))))
238+ :else (throw [::FileNotFoundException (str " No file or directory at path: " x)] ))))
239239
240240
You can’t perform that action at this time.
0 commit comments