Skip to content
This repository has been archived by the owner on Feb 2, 2021. It is now read-only.

Commit

Permalink
Better error reporting for deploy on device
Browse files Browse the repository at this point in the history
  • Loading branch information
Fatme Havaluova authored and Fatme Havaluova committed Dec 7, 2015
1 parent 2b0980f commit b56e51b
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions mobile/ios/ios-core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import * as bplistParser from "bplist-parser";
import * as string_decoder from "string_decoder";
import * as stream from "stream";
import * as assert from "assert";
import {EOL} from "os";

export class CoreTypes {
public static pointerSize = ref.types.size_t.size;
Expand Down Expand Up @@ -867,6 +868,23 @@ class PosixSocket implements Mobile.IiOSDeviceSocket {
}
this.$logger.out(output);

let errorMessage: string = "";
if (message.Error) {
errorMessage += `Error: ${message.Error} ${EOL}`;
}
if (message.ErrorDescription) {
errorMessage += `ErrorDescription: ${message.ErrorDescription} ${EOL}`;
}
if (message.ErrorDetail) {
errorMessage += `ErrorDetail: ${message.ErrorDetail} ${EOL}`;
}

if (errorMessage) {
if (!result.isResolved()) {
result.throw(new Error(errorMessage));
}
}

if (message.Status && message.Status === "Complete") {
if (!result.isResolved()) {
result.return(message);
Expand Down

0 comments on commit b56e51b

Please sign in to comment.