Open source Android date and time pickers

Reviewed By: bestander

Differential Revision: D2856486

fb-gh-sync-id: 0bb81136289e2f121387649765ba682103e4701b
This commit is contained in:
Martin Konicek
2016-01-26 10:29:47 -08:00
committed by facebook-github-bot-8
parent 5f0ef12cb5
commit 9a0539d2c4
29 changed files with 1275 additions and 41 deletions

View File

@@ -34,23 +34,28 @@ public class PromiseImpl implements Promise {
}
@Override
public void reject(Throwable reason) {
reject(DEFAULT_ERROR, reason.getMessage(), reason);
public void reject(String code, String message) {
reject(code, message, /*Throwable*/null);
}
@Override
@Deprecated
public void reject(String reason) {
reject(DEFAULT_ERROR, reason, null);
public void reject(String message) {
reject(DEFAULT_ERROR, message, /*Throwable*/null);
}
@Override
public void reject(String code, Throwable extra) {
reject(code, extra.getMessage(), extra);
public void reject(String code, Throwable e) {
reject(code, e.getMessage(), e);
}
@Override
public void reject(String code, String reason, @Nullable Throwable extra) {
public void reject(Throwable e) {
reject(DEFAULT_ERROR, e.getMessage(), e);
}
@Override
public void reject(String code, String message, @Nullable Throwable e) {
if (mReject != null) {
if (code == null) {
code = DEFAULT_ERROR;
@@ -60,7 +65,7 @@ public class PromiseImpl implements Promise {
// error instance.
WritableNativeMap errorInfo = new WritableNativeMap();
errorInfo.putString("code", code);
errorInfo.putString("message", reason);
errorInfo.putString("message", message);
// TODO(8850038): add the stack trace info in, need to figure out way to serialize that
mReject.invoke(errorInfo);
}