Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Salesforce Platform Developer I Certification Guide

You're reading from   Salesforce Platform Developer I Certification Guide Expert tips, techniques, and mock tests for the Platform Developer I (DEV501) certification exam

Arrow left icon
Product type Paperback
Published in May 2019
Publisher Packt
ISBN-13 9781789802078
Length 546 pages
Edition 1st Edition
Languages
Arrow right icon
Authors (2):
Arrow left icon
Jan Vandevelde Jan Vandevelde
Author Profile Icon Jan Vandevelde
Jan Vandevelde
Gunther Roskams Gunther Roskams
Author Profile Icon Gunther Roskams
Gunther Roskams
Arrow right icon
View More author details
Toc

Table of Contents (15) Chapters Close

Preface 1. Section 1: Fundamentals, Data Modeling, and Management FREE CHAPTER
2. Salesforce Fundamentals 3. Understanding Data Modeling and Management 4. Section 2: Logic, Process Automation, and the User Interface
5. Declarative Automation 6. Apex Basics 7. Apex - Beyond the Basics 8. The Salesforce User Interface 9. Section 3: Testing, Debugging, and Exercise
10. Testing in Salesforce 11. Debugging and Deployment Tools 12. Mock Tests 13. Other Books You May Enjoy Appendix

Exception handling

What happens if you update a record and the update fails because you entered the wrong data? Yes, correct—you get an error message. But behind the scenes, this is what we developers call an exception.

In Salesforce, you have two big types of exceptions:

  • Standard exceptions
  • Custom exceptions

Standard exceptions are predefined in Salesforce. If you update a record and the update fails, you'll receive a DML exception. If a callout to a web service fails, you will receive a callout exception. You can find all types of standard exceptions in an overview at https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_classes_exception_methods.htm.

But how do we use the standard exceptions? Do you remember, in one of the first lessons of this book, the try...catch structure?

Yes, we try to execute some logic, and if the execution fails...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image