-
Notifications
You must be signed in to change notification settings - Fork 323
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
DataflowError.withoutTrace shall not store a trace (#8608)
- Loading branch information
1 parent
7443683
commit 07d58f2
Showing
23 changed files
with
360 additions
and
87 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 5 additions & 12 deletions
17
...in/java/org/enso/interpreter/node/expression/builtin/error/GetAttachedStackTraceNode.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,19 @@ | ||
package org.enso.interpreter.node.expression.builtin.error; | ||
|
||
import com.oracle.truffle.api.interop.InteropLibrary; | ||
import com.oracle.truffle.api.nodes.Node; | ||
import org.enso.interpreter.dsl.AcceptsError; | ||
import org.enso.interpreter.dsl.BuiltinMethod; | ||
import org.enso.interpreter.node.expression.builtin.runtime.GetStackTraceNode; | ||
import org.enso.interpreter.runtime.EnsoContext; | ||
import org.enso.interpreter.runtime.builtin.Builtins; | ||
import org.enso.interpreter.runtime.data.EnsoObject; | ||
import org.enso.interpreter.runtime.error.PanicException; | ||
|
||
@BuiltinMethod( | ||
type = "Panic", | ||
name = "primitive_get_attached_stack_trace", | ||
description = "Gets the stack trace attached to the throwable.") | ||
public class GetAttachedStackTraceNode extends Node { | ||
EnsoObject execute(@AcceptsError Object error) { | ||
if (error instanceof Throwable) { | ||
return GetStackTraceNode.stackTraceToArray((Throwable) error); | ||
} else { | ||
Builtins builtins = EnsoContext.get(this).getBuiltins(); | ||
throw new PanicException( | ||
builtins.error().makeTypeError("Throwable", error, "throwable"), this); | ||
} | ||
@Child private InteropLibrary iop = InteropLibrary.getFactory().createDispatched(3); | ||
|
||
Object execute(@AcceptsError Object error) { | ||
return GetStackTraceNode.stackTraceToArray(iop, error); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.