Skip to content

Commit

Permalink
m
Browse files Browse the repository at this point in the history
  • Loading branch information
ajewellamz committed Nov 3, 2024
1 parent af0fab3 commit 4d864a8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -705,7 +705,7 @@ MethodSpec generateConvertOpaqueServiceError() {
"nativeValue"
)
.addStatement(
"return $T.create_OpaqueWithText(nativeValue, dafny.DafnySequence.asString(nativeValue.toString()))",
"return $T.create_OpaqueWithText(nativeValue, dafny.DafnySequence.asString(nativeValue.getMessage()))",
subject.dafnyNameResolver.abstractClassForError()
)
.build();
Expand All @@ -731,7 +731,7 @@ MethodSpec generateConvertOpaqueError() {
"Which would allow Dafny developers to treat the two differently."
)
.addStatement(
"return $T.create_OpaqueWithText(nativeValue, dafny.DafnySequence.asString(nativeValue.toString()))",
"return $T.create_OpaqueWithText(nativeValue, dafny.DafnySequence.asString(nativeValue.getMessage()))",
subject.dafnyNameResolver.abstractClassForError()
)
.build();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ public static software.amazon.cryptography.services.kms.internaldafny.types.Erro
// An un-modeled Service Error is different from a Java Heap Exhaustion error.
// In the future, Smithy-Dafny MAY allow for this distinction.
// Which would allow Dafny developers to treat the two differently.
return software.amazon.cryptography.services.kms.internaldafny.types.Error.create_Opaque(nativeValue);
return software.amazon.cryptography.services.kms.internaldafny.types.Error.create_OpaqueWithText(nativeValue, dafny.DafnySequence.asString(nativeValue.getMessage()));
}
""";

Expand All @@ -129,7 +129,7 @@ public static software.amazon.cryptography.services.kms.internaldafny.types.Erro
// An un-modeled Service Error is different from a Java Heap Exhaustion error.
// In the future, Smithy-Dafny MAY allow for this distinction.
// Which would allow Dafny developers to treat the two differently.
return software.amazon.cryptography.services.kms.internaldafny.types.Error.create_Opaque(nativeValue);
return software.amazon.cryptography.services.kms.internaldafny.types.Error.create_OpaqueWithText(nativeValue, dafny.DafnySequence.asString(nativeValue.getMessage()));
}
""";

Expand Down

0 comments on commit 4d864a8

Please sign in to comment.