-
Can we add multiple if or if - else if statements in a try catch block?
Is something like below even possible?
static String TEST_LINK = 'someLink/';
static String TEST_LINK2 = 'otherLink/';
//class method
public someMethod(String test) {
try {
if (!somecondition.matches(TEST_LINK)) { return something;}
if (!somecondition.matches(TEST_LINK2)) { return something;}
} catch (Exception e) {
}
}
Log In to reply.
Popular Salesforce Blogs
How do Salesforce consulting companies help your business grow?
Salesforce has time and again proven to be the best platform-as-a-service cloud CRM in the world. At present, Salesforce is the most widely used cloud…
Content Object | Salesforce
Agenda Data Model Content Document Content Version Content Workspace Content Workspace Doc Developer Support Data Model Content Document Represents a document that has been uploaded…
How Salesforce Mobile App Can Help Your Business?
The traffic on the internet has been constantly shifting from desktops to mobile phones, and approximately 70% of active users on the internet are from…
Popular Salesforce Videos
Three Quick Wins With Pardot | Salesforce
Discover the full suite of B2B marketing automation tools to create meaningful connections, generate more pipeline, and empower sales teams to close more deals. See…
Creating Massive Junction Records with LWC | Salesforce Lightning Tutorial
Don't miss this new interchange session with Jorge Ortega and Alba Rivas! They'll discuss how to build an LWC that allows you to easily create…
Common Salesforce Project Risks and How to Mitigate Them
Salesforce is easy to use, but don’t let its user-friendly interface fool you. Deploying Salesforce projects takes planning to be effective. Otherwise, you expose your…
Popular Salesforce Infographics
Why Do Business Move To Salesforce?
Salesforce Improves Customer Data Quality & Management – One of the core functions of all CRMs is data management about customers. Salesforce delivers in this…
DataArchiva - A Native Data Archiving App for Salesforce using Big Objects
A Native Data Archiving app for Salesforce using Big Objects. With Auto-scheduler, Custom Archiving, Encryption, Integrity and Restore features, DataArchiva saves 85%+ storage costs, improves…
How Sales Reps are Staying at the Top of Their Game | Salesforce Guide
Sales reps around the world had to rapidly adopt new methods to work around lockdowns and travel restrictions. In some cases, this meant learning new…