1/* 2 * Copyright (c) Facebook, Inc. and its affiliates. 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17namespace java.swift test.fixtures.exceptions 18 19transient server exception Fiery { 20 1: required string message; 21} (message = "message") 22 23safe stateful exception Serious { 24 1: optional string sonnet; 25} (message = "sonnet") 26 27client exception ComplexFieldNames { 28 1: string error_message; 29 2: string internal_error_message; 30} (message = "internal_error_message") 31 32exception CustomFieldNames { 33 1: string error_message; 34 2: string internal_error_message (java.swift.name = "internalGreatMessage"); 35} (message = "internal_error_message") 36 37exception ExceptionWithPrimitiveField { 38 1: string message; 39 2: i32 error_code; 40} (message = "message") 41 42service Raiser { 43 void doBland(); 44 void doRaise() throws (1: Banal b, 2: Fiery f, 3: Serious s); 45 string get200(); 46 string get500() throws (1: Fiery f, 2: Banal b, 3: Serious s); 47} 48 49safe permanent client exception Banal {} 50