Skip to content

Commit 27bb43a

Browse files
Arjun Hande H Nfacebook-github-bot
authored andcommitted
Revert D52861937: Augment thrift.ExceptionMessage docs
Differential Revision: D52861937 Original commit changeset: d9dc88d32f33 Original Phabricator Diff: D52861937 fbshipit-source-id: 29713a9d09ce79b76c11696d6e7602d4004783f4
1 parent 4504772 commit 27bb43a

File tree

2 files changed

+0
-22
lines changed

2 files changed

+0
-22
lines changed

third-party/thrift/src/thrift/annotation/thrift.thrift

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -167,22 +167,6 @@ struct BitmaskEnum {}
167167

168168
/**
169169
* Specifies the field where the exception message is stored.
170-
*
171-
* The "exception message" is typically a human-readable description of the
172-
* exception. It is made available to the exception-handling code via standard,
173-
* language-dependent APIs of the generated code, such as:
174-
* - [`std::exception::what()`](https://en.cppreference.com/w/cpp/error/exception/what)
175-
* in C++.
176-
* - [`Throwable.getMessage()`](https://docs.oracle.com/javase/8/docs/api/java/lang/Throwable.html#getMessage--)
177-
* in Java.
178-
* - etc.
179-
*
180-
* This annotation can be specified on at most one field of an
181-
* [exception definition](https://github.com/facebook/fbthrift/blob/main/thrift/doc/idl/index.md#exceptions),
182-
* whose type must be `string`.
183-
*
184-
* If an exception definition does not specify this anotation for any field, the
185-
* exception message returned by the aforementioned APIs is unspecified.
186170
*/
187171
@scope.Field
188172
struct ExceptionMessage {}

third-party/thrift/src/thrift/doc/features/exception.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,6 @@ A **declared** exception is an exception struct defined in IDL. Interfaces can d
1313

1414
An **undeclared** exception is thrown by Thrift methods that are wrapped into a generic [TApplicationException](https://github.com/facebook/fbthrift/blob/main/thrift/lib/cpp/TApplicationException.h) or [TTransportException](https://github.com/facebook/fbthrift/blob/main/thrift/lib/cpp/transport/TTransportException.h) and passed to the client. It is similar to throwing generic exceptions (e.g. `Exception` or `std::exception`) and is generally discouraged since it is too general to carry sufficient information. It is highly encouraged to avoid as much as possible throwing undeclared exceptions.
1515

16-
### Exception Message
17-
18-
A custom (human-readable) exception message may be specified in a field, by
19-
annotating it with
20-
[`@thrift.ExceptionMessage`](/idl/annotations.md#thrift-annotations).
21-
2216
## Error Classification
2317
### Kind
2418
Thrift Error can be classified into three categories: **Transient**, **Stateful**, and **Permanent**.

0 commit comments

Comments
 (0)