NullPointerException when source file does not exist (e.g. in mdoc)
TomasMikula opened this issue · comments
Tomas Mikula commented
Hi,
when trying to use sourcecode
in an mdoc snippet, NullPointerException
is thrown.
Mdoc input:
```scala mdoc
implicitly[sourcecode.File]
```
Error:
java.lang.NullPointerException: Cannot invoke "java.nio.file.Path.toAbsolutePath()" because the return value of "scala.quoted.Quotes$reflectModule$SourceFileMethods.jpath(Object)" is null
at sourcecode.Macros$.fileImpl(Macros.scala:150)
Would it be possible to return something like File("<none>")
instead?