Skip to content

Commit

Permalink
Expose type MissingData in HILTI.
Browse files Browse the repository at this point in the history
This exposes the `MissingData` exception in HILTI. This will allow us to
handle it explicitly in a follow-up commit.
  • Loading branch information
bbannier committed Jul 7, 2022
1 parent 6926a0e commit 38efc33
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions hilti/lib/hilti.hlt
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ public type RuntimeError = exception &cxxname="::hilti::rt::RuntimeError";
# Base class for exceptions which can be recovered.
public type RecoverableFailure = exception &cxxname="::hilti::rt::RecoverableFailure";

# Exception raised when attempting to extracting data from a gap.
public type MissingData = exception &cxxname="::hilti::rt::MissingData";

# Returns the message associated with an exception.
declare public string exception_what(SystemException excpt) &cxxname="::hilti::rt::exception::what" &have_prototype;
}
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,7 @@
[debug/ast-declarations] - Type "SystemException" (hilti::SystemException)
[debug/ast-declarations] - Type "RuntimeError" (hilti::RuntimeError)
[debug/ast-declarations] - Type "RecoverableFailure" (hilti::RecoverableFailure)
[debug/ast-declarations] - Type "MissingData" (hilti::MissingData)
[debug/ast-declarations] - Function "exception_what" (hilti::exception_what)
[debug/ast-declarations] - Parameter "excpt" (hilti::exception_what::excpt)
[debug/ast-declarations] # [HILTI] a
Expand Down Expand Up @@ -662,6 +663,7 @@
[debug/ast-declarations] - Type "SystemException" (hilti::SystemException)
[debug/ast-declarations] - Type "RuntimeError" (hilti::RuntimeError)
[debug/ast-declarations] - Type "RecoverableFailure" (hilti::RecoverableFailure)
[debug/ast-declarations] - Type "MissingData" (hilti::MissingData)
[debug/ast-declarations] - Function "exception_what" (hilti::exception_what)
[debug/ast-declarations] - Parameter "excpt" (hilti::exception_what::excpt)
[debug/ast-declarations] # [HILTI] spicy_rt
Expand Down
2 changes: 2 additions & 0 deletions tests/Baseline/spicy.types.unit.canonical-ids/output
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,7 @@
[debug/ast-declarations] - Type "SystemException" (hilti::SystemException)
[debug/ast-declarations] - Type "RuntimeError" (hilti::RuntimeError)
[debug/ast-declarations] - Type "RecoverableFailure" (hilti::RecoverableFailure)
[debug/ast-declarations] - Type "MissingData" (hilti::MissingData)
[debug/ast-declarations] - Function "exception_what" (hilti::exception_what)
[debug/ast-declarations] - Parameter "excpt" (hilti::exception_what::excpt)
[debug/ast-declarations] # [HILTI] DNS
Expand Down Expand Up @@ -1008,6 +1009,7 @@
[debug/ast-declarations] - Type "SystemException" (hilti::SystemException)
[debug/ast-declarations] - Type "RuntimeError" (hilti::RuntimeError)
[debug/ast-declarations] - Type "RecoverableFailure" (hilti::RecoverableFailure)
[debug/ast-declarations] - Type "MissingData" (hilti::MissingData)
[debug/ast-declarations] - Function "exception_what" (hilti::exception_what)
[debug/ast-declarations] - Parameter "excpt" (hilti::exception_what::excpt)
[debug/ast-declarations] # [HILTI] spicy_rt
Expand Down

0 comments on commit 38efc33

Please sign in to comment.