試験PDI-JPN トピック2 問題59 スレッド

Salesforce PDI-JPNのリアル試験問題集
問題 #: 59
トピック #: 2
開発者は、以下に示すようにカスタム例外を作成します。
パブリッククラス ParityException は Exception { } を拡張します。
開発者が Apex で例外を発生させる 2 つの方法は何ですか?

おすすめの解答:A,B 解答を投票する

* Throwing Exceptions in Apex:
* throw new ExceptionType(); creates a new instance and throws it.
* A: No argument constructor.
* B: Constructor with a custom error message.
* Why Not Other Options?
* C and D: These create exception instances but do not throw them, which is not valid syntax for firing an exception.
* Apex Exception Handling: https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode
/apex_classes_exception_methods.htm
References:

松岛** 2026-09-13 12:20:56

コメント

正解:
?」こちらは投票コメントになっております。普通のコメントに切り替えます。
ニックネーム: 送信 キャンセル
投票コメントをあげるごとに、選択した解答の投票数を1つ増やすことができます。

他人の解答コメントを賛成するのも、その解答に一票を入れることになります。したがって、すでに同じ意見の投票コメントが存在する場合、新規コメントをする代わりに賛成することもできます。

弊社を連絡する

我々は12時間以内ですべてのお問い合わせを答えます。

オンラインサポート時間:( UTC+9 ) 9:00-24:00
月曜日から土曜日まで

サポート:現在連絡