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

chore(Java): benerate opaque with message includes exception class name #1391

Draft
wants to merge 1 commit into
base: mutations/mutations
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,9 @@ public static Error Error(OpaqueError nativeValue) {
public static Error Error(OpaqueWithTextError nativeValue) {
return Error.create_OpaqueWithText(
nativeValue.obj(),
dafny.DafnySequence.asString(nativeValue.objMessage())
dafny.DafnySequence.asString(
nativeValue.getClass().getSimpleName() + ": " + nativeValue.getMessage()
)
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,9 @@ public static Error Error(OpaqueError nativeValue) {
public static Error Error(OpaqueWithTextError nativeValue) {
return Error.create_OpaqueWithText(
nativeValue.obj(),
dafny.DafnySequence.asString(nativeValue.objMessage())
dafny.DafnySequence.asString(
nativeValue.getClass().getSimpleName() + ": " + nativeValue.getMessage()
)
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,9 @@ public static Error Error(OpaqueError nativeValue) {
public static Error Error(OpaqueWithTextError nativeValue) {
return Error.create_OpaqueWithText(
nativeValue.obj(),
dafny.DafnySequence.asString(nativeValue.objMessage())
dafny.DafnySequence.asString(
nativeValue.getClass().getSimpleName() + ": " + nativeValue.getMessage()
)
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13565,7 +13565,9 @@ public static Error Error(Exception nativeValue) {
// Which would allow Dafny developers to treat the two differently.
return Error.create_OpaqueWithText(
nativeValue,
dafny.DafnySequence.asString(nativeValue.getMessage())
dafny.DafnySequence.asString(
nativeValue.getClass().getSimpleName() + ": " + nativeValue.getMessage()
)
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5729,7 +5729,9 @@ public static Error Error(KmsException nativeValue) {
// Which would allow Dafny developers to treat the two differently.
return Error.create_OpaqueWithText(
nativeValue,
dafny.DafnySequence.asString(nativeValue.getMessage())
dafny.DafnySequence.asString(
nativeValue.getClass().getSimpleName() + ": " + nativeValue.getMessage()
)
);
}

Expand Down
Loading