Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

case of and intersection types #11850

Merged
merged 9 commits into from
Dec 13, 2024
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import com.oracle.truffle.api.TruffleStackTrace;
import com.oracle.truffle.api.TruffleStackTraceElement;
import com.oracle.truffle.api.nodes.Node;
import java.io.File;
import java.util.ArrayList;
import java.util.Collections;
import org.enso.interpreter.dsl.BuiltinMethod;
Expand Down Expand Up @@ -76,6 +77,11 @@ String printStackTrace(Throwable throwable) {
var sourceLoc = errorFrame.getLocation().getEncapsulatingSourceSection();
if (sourceLoc != null) {
var path = sourceLoc.getSource().getPath();
try {
path = new File(sourceLoc.getSource().getURI()).getPath();
JaroslavTulach marked this conversation as resolved.
Show resolved Hide resolved
} catch (IllegalArgumentException | NullPointerException ignore) {
// keep original value of path
}
var ident = (path != null) ? path : sourceLoc.getSource().getName();
var loc =
(sourceLoc.getStartLine() == sourceLoc.getEndLine())
Expand Down