Salesforce Apex (Arabic): Exception Handling Basics - Part 1

Опубликовано: 18 Июнь 2026
на канале: Code With Sally
70
4

في السيشن دي بدأنا موضوع جديد في Salesforce Apex وهو Exception Handling أو التعامل مع الأخطاء.

✅ اتكلمنا عن:
يعني إيه Exception؟ وإزاي بتحصل؟
إزاي نكتب Custom Exception لما نحتاج نغطي حالات معينة في الكود.
شرح مفصل وعملي لـ try-catch-finally وشفنا كذا سيناريو على كود حقيقي.
ديمو بيشرح الفرق بين الكود اللي فيه error handling والكود اللي مفيهوش.

🎯 هدفنا إننا نخلي الكود بتاعنا more stable ونفهم إزاي ندي للمستخدم رسالة مفهومة بدل error message صعبة وغريبة.

📂 كود الجلسة كله موجود على GitHub هنا: https://github.com/CodeWithSally/Code...

لو عندك أي سؤال، ابعتهولي على LinkedIn أو في الكومنتات وممكن نعمل بيه فيديو مخصوص ❤️

#Salesforce #Apex #ExceptionHandling #CodeWithSally #بال_عربي #تعلم_Salesforce
==============================================================
In this video, we kick off a brand new topic in Apex: Exception Handling!

🔍 What we covered:
What is an exception and why exception handling is important in Apex?
Demo: See how unhandled exceptions crash your logic and how to fix that.
Common scenarios where error handling is needed in real-world Salesforce development.
Types of exceptions in Apex (System vs. Custom).
How to create your own Custom Exception class.
How to use try-catch-finally blocks with real code examples.

🎯 This session is packed with practical examples to help you write cleaner, safer, and more user-friendly code in Apex.

📂 GitHub Code Files: https://github.com/CodeWithSally/Code...

💬 Got a question? Drop it in the comments or on LinkedIn – I’d love to turn it into a future session or a quick tip video!

#Salesforce #Apex #ExceptionHandling #CodeWithSally #ApexDevelopment #ErrorHandling #TryCatch #SalesforceArabic #learnsalesforce

Timestamps:
00:00 – Welcome & YouTube Channel Overview
2:46 – Recap: Importance of Unit Testing
3:22 – Introduction to Error Handling & Exceptions
4:18 – What Is Apex Error Handling?
8:58 – Demo: Handled vs Unhandled Exception
11:37 – Why Is Error Handling Important?
14:46 – Common Scenarios & Exception Types
22:22 – Types of Exceptions in Apex
25:45 – Demo: Custom Exception (MissingRequiredFieldException)
29:01 – Using Try-Catch Blocks + Live Demo
46:50 – Recap of Try-Catch Block
47:23 – Session Closing

=============================================================
Music: https://www.bensound.com
License code: 2GNUHBVBW7Y8HRPV

Music by https://www.bensound.com
License code: NTLHSKH3YXKQMPEX