Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

style: fix indent #31

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 28 additions & 28 deletions force-app/main/default/classes/RollbarExceptionEmailHandler.cls
Original file line number Diff line number Diff line change
@@ -1,35 +1,35 @@
global class RollbarExceptionEmailHandler implements Messaging.InboundEmailHandler {

global Messaging.InboundEmailResult handleInboundEmail(Messaging.InboundEmail email,
Messaging.InboundEnvelope env){

// Create an InboundEmailResult object for returning the result of the
// Apex Email Service
Messaging.InboundEmailResult result = new Messaging.InboundEmailResult();

try {
try {
parseAndSend(email);
} catch(Exception exc) {
exc.getStackTraceString(); // without those calls strack trace string is not populated
throw new ExceptionEmailParsingException('Unable to process unhandled exception email', exc);
}
} catch(ExceptionEmailParsingException wrapper) {
wrapper.getStackTraceString(); // without those calls strack trace string is not populated

Map<String, String> custom = new Map<String, String>();
custom.put('email_body', getUnknownEmailBody(email));

Rollbar.log(wrapper, custom);
}
global Messaging.InboundEmailResult handleInboundEmail(Messaging.InboundEmail email,
Messaging.InboundEnvelope env){

// Create an InboundEmailResult object for returning the result of the
// Apex Email Service
Messaging.InboundEmailResult result = new Messaging.InboundEmailResult();

try {
try {
parseAndSend(email);
} catch(Exception exc) {
exc.getStackTraceString(); // without those calls strack trace string is not populated
throw new ExceptionEmailParsingException('Unable to process unhandled exception email', exc);
}
} catch(ExceptionEmailParsingException wrapper) {
wrapper.getStackTraceString(); // without those calls strack trace string is not populated

Map<String, String> custom = new Map<String, String>();
custom.put('email_body', getUnknownEmailBody(email));

Rollbar.log(wrapper, custom);
}

// Set the result to true. No need to send an email back to the user
// with an error message
result.success = true;
// Set the result to true. No need to send an email back to the user
// with an error message
result.success = true;

// Return the result for the Apex Email Service
return result;
}
// Return the result for the Apex Email Service
return result;
}

private void parseAndSend(Messaging.InboundEmail email) {
RollbarSettings__c settings = RollbarSettings__c.getOrgDefaults();
Expand Down