put exception message in front of error log

Summary: Exception message was the last part of the whole shown error. This is not optimal in case where there are deeply nested objects as parameters, which used to be displayed before the message.
This diff moves the exception message to the front.

public

Reviewed By: javache

Differential Revision: D2691426

fb-gh-sync-id: c6c9ad3ac4681a8102ea2c580f24382640b7246c
This commit is contained in:
Martin Kralik 2015-11-24 12:10:48 -08:00 committed by facebook-github-bot-3
parent 2c14ab582a
commit 510f001390
1 changed files with 2 additions and 2 deletions

View File

@ -785,8 +785,8 @@ RCT_NOT_IMPLEMENTED(- (instancetype)initWithBundleURL:(__unused NSURL *)bundleUR
}
NSString *message = [NSString stringWithFormat:
@"Exception thrown while invoking %@ on target %@ with params %@: %@",
method.JSMethodName, moduleData.name, params, exception];
@"Exception '%@' was thrown while invoking %@ on target %@ with params %@",
exception, method.JSMethodName, moduleData.name, params];
RCTFatal(RCTErrorWithMessage(message));
}