試験PDI-JPN トピック2 問題59 スレッド
Salesforce PDI-JPNのリアル試験問題集
問題 #: 59
トピック #: 2
問題 #: 59
トピック #: 2
開発者は、以下に示すようにカスタム例外を作成します。
パブリッククラス ParityException は Exception { } を拡張します。
開発者が Apex で例外を発生させる 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:
* 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
コメント
他人の解答コメントを賛成するのも、その解答に一票を入れることになります。したがって、すでに同じ意見の投票コメントが存在する場合、新規コメントをする代わりに賛成することもできます。
コメントを通報する
コメント中
今すぐ 新規登録 / ログイン (無料です)。