[jira] [Commented] (WEEX-569) [iOS] fix degrade_error not report

2018-08-16 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/WEEX-569?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16582183#comment-16582183
 ] 

ASF GitHub Bot commented on WEEX-569:
-

cxfeng1 closed pull request #1440: [WEEX-569][iOS] fix degrade_error not report
URL: https://github.com/apache/incubator-weex/pull/1440
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/ios/sdk/WeexSDK/Sources/Engine/WXSDKError.h 
b/ios/sdk/WeexSDK/Sources/Engine/WXSDKError.h
index 7b82798c4f..ba446b2521 100644
--- a/ios/sdk/WeexSDK/Sources/Engine/WXSDKError.h
+++ b/ios/sdk/WeexSDK/Sources/Engine/WXSDKError.h
@@ -20,6 +20,16 @@
 #import 
 #import "WXSDKInstance.h"
 
+#define WX_ERROR_GROUP_NATIVE   @"NATIVE"
+#define WX_ERROR_GROUP_JS   @"JS"
+#define WX_ERROR_GROUP_NET  @"NET"
+
+#define WX_ERROR_TYPE_NATIVE@"NATIVE_ERROR"
+#define WX_ERROR_TYPE_JS@"JS_ERROR"
+#define WX_ERROR_TYPE_DEGRADE@"DEGRADE_ERROR"
+#define WX_ERROR_TYPE_RENDER@"RENDER_ERROR"
+
+
 typedef NS_ENUM(int, WXSDKErrCode)
 {
 WX_ERR_JSFRAMEWORK_START = -1001,
@@ -62,6 +72,7 @@ typedef NS_ENUM(int, WXSDKErrCode)
 WX_KEY_EXCEPTION_DEGRADE_CHECK_CONTENT_LENGTH_FAILED = -9501,
 WX_KEY_EXCEPTION_DEGRADE_BUNDLE_CONTENTTYPE_ERROR = -9502,
 WX_KEY_EXCEPTION_DEGRADE_OTHER_CAUSE = -9503,
+WX_KEY_EXCEPTION_DEGRADE_NET_CODE_CAUSE = -9504,
 
 WX_KEY_EXCEPTION_ABILITY_DOWN = -9600,
 WX_KEY_EXCEPTION_ABILITY_DOWN_IMAGE = -9601,
@@ -71,23 +82,26 @@ typedef NS_ENUM(int, WXSDKErrCode)
 WX_KEY_EXCEPTION_EMPTY_SCREEN_JS = -9700
 };
 
-typedef NS_ENUM (int,WXSDKErrorType)
+typedef NS_ENUM (NSInteger,WXSDKErrorType)
 {
-JS_ERROR,
-NATIVE_ERROR,
-RENDER_ERROR,
-DEGRAD_ERROR
+WX_JS_ERROR,
+WX_NATIVE_ERROR,
+WX_RENDER_ERROR,
+WX_DEGRADE_ERROR
 };
 
-typedef NS_ENUM (int,WXSDKErrorGroup){
-JS,
-NATIVE
+typedef NS_ENUM (NSInteger,WXSDKErrorGroup){
+WX_JS,
+WX_NATIVE,
+WX_NET
 };
 
 @interface WXSDKErrCodeUtil :NSObject
 
 + (WXSDKErrorType) getErrorTypeByCode:(WXSDKErrCode) code;
 + (WXSDKErrorGroup) getErrorGroupByCode:(WXSDKErrCode) code;
++ (NSString *) convertGroupToStringName:(WXSDKErrorGroup) group;
++ (NSString *) convertTypeToStringName:(WXSDKErrorType)type;
 
 @end
 
diff --git a/ios/sdk/WeexSDK/Sources/Engine/WXSDKError.m 
b/ios/sdk/WeexSDK/Sources/Engine/WXSDKError.m
index 90ea06fc56..c3b9a7791a 100644
--- a/ios/sdk/WeexSDK/Sources/Engine/WXSDKError.m
+++ b/ios/sdk/WeexSDK/Sources/Engine/WXSDKError.m
@@ -29,7 +29,7 @@ +(WXSDKErrorType)getErrorTypeByCode:(WXSDKErrCode)code
 {
 NSDictionary* codeMap = [[self getMap] objectForKey:@(code)];
 if (!codeMap) {
-return NATIVE_ERROR;
+return WX_NATIVE_ERROR;
 }
 return [[codeMap objectForKey:ERROR_TYPE] intValue];
 }
@@ -39,7 +39,7 @@ +(WXSDKErrorGroup) getErrorGroupByCode:(WXSDKErrCode)code
 {
 NSDictionary* codeMap = [[self getMap] objectForKey:@(code)];
 if (!codeMap) {
-return NATIVE;
+return WX_NATIVE;
 }
 return [[codeMap objectForKey:ERROR_GROUP] intValue];
 }
@@ -52,56 +52,85 @@ +(NSDictionary *) getMap
 dispatch_once(&onceToken, ^{
 
 codeMap=@{
-
@(WX_ERR_JSFRAMEWORK_START):@{ERROR_TYPE:@(NATIVE_ERROR),ERROR_GROUP:@(NATIVE)},
-
@(WX_ERR_JSFRAMEWORK_LOAD):@{ERROR_TYPE:@(NATIVE_ERROR),ERROR_GROUP:@(NATIVE)},
-
@(WX_ERR_JSFRAMEWORK_EXECUTE):@{ERROR_TYPE:@(NATIVE_ERROR),ERROR_GROUP:@(NATIVE)},
-
@(WX_ERR_JSFRAMEWORK_END):@{ERROR_TYPE:@(NATIVE_ERROR),ERROR_GROUP:@(NATIVE)},
+
@(WX_ERR_JSFRAMEWORK_START):@{ERROR_TYPE:@(WX_NATIVE_ERROR),ERROR_GROUP:@(WX_NATIVE)},
+
@(WX_ERR_JSFRAMEWORK_LOAD):@{ERROR_TYPE:@(WX_NATIVE_ERROR),ERROR_GROUP:@(WX_NATIVE)},
+
@(WX_ERR_JSFRAMEWORK_EXECUTE):@{ERROR_TYPE:@(WX_NATIVE_ERROR),ERROR_GROUP:@(WX_NATIVE)},
+
@(WX_ERR_JSFRAMEWORK_END):@{ERROR_TYPE:@(WX_NATIVE_ERROR),ERROR_GROUP:@(WX_NATIVE)},
 
-
@(WX_ERR_JSBRIDGE_START):@{ERROR_TYPE:@(NATIVE_ERROR),ERROR_GROUP:@(NATIVE)},
-
@(WX_ERR_RENDER_CREATEBODY):@{ERROR_TYPE:@(NATIVE_ERROR),ERROR_GROUP:@(NATIVE)},
-
@(WX_ERR_INVOKE_NATIVE):@{ERROR_TYPE:@(NATIVE_ERROR),ERROR_GROUP:@(NATIVE)},
-
@(WX_ERR_JS_EXECUTE):@{ERROR_TYPE:@(JS_ERROR),ERROR_GROUP:@(JS)},
-
@(WX_ERR_JSBRIDGE_END):@{ERROR_TYPE:@(JS_ERROR),ERROR_GROUP:@(JS)},
+
@(WX_ERR_JSBRIDGE_START):@{ERROR_TYPE:@(WX_NATIVE_ERROR),ERROR_GROUP:@(WX_NATIVE)},
+
@(WX_ERR_RENDER_CREATEBODY):@{ERROR_TYPE:@(WX_NATIVE_ERROR),ERROR_GROUP:@(WX_NATIVE)},
+  

[jira] [Commented] (WEEX-569) [iOS] fix degrade_error not report

2018-08-16 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/WEEX-569?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16582106#comment-16582106
 ] 

ASF GitHub Bot commented on WEEX-569:
-

weex-bot edited a comment on issue #1440: [WEEX-569][iOS] fix degrade_error not 
report
URL: https://github.com/apache/incubator-weex/pull/1440#issuecomment-413418453
 
 
   
   
   
   
   
   
 
   
 
 Messages
   
 
 
 :book:
 No android file has been changed.
   
 
   
 :book:
 android build verification finished.
   
 
   
   
   
   
 Generated by :no_entry_sign: http://github.com/danger/danger-js/";>dangerJS
   
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> [iOS] fix degrade_error not report 
> ---
>
> Key: WEEX-569
> URL: https://issues.apache.org/jira/browse/WEEX-569
> Project: Weex
>  Issue Type: Bug
>  Components: iOS
>Reporter: peihan
>Assignee: XuYouyang
>Priority: Major
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (WEEX-569) [iOS] fix degrade_error not report

2018-08-16 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/WEEX-569?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16582103#comment-16582103
 ] 

ASF GitHub Bot commented on WEEX-569:
-

weex-bot edited a comment on issue #1440: [WEEX-569][iOS] fix degrade_error not 
report
URL: https://github.com/apache/incubator-weex/pull/1440#issuecomment-413418453
 
 
   
   
   
   
 
   
 
 Fails
   
 
 
 :no_entry_sign:
 Code file ios/sdk/WeexSDK/Sources/Protocol/WXApmProtocol.h does 
not have the copyright header.
   
 
   
   
   
   
 
   
 
 Warnings
   
 
 
 :warning:
 No Changelog changes!
   
 
   
   
   
   
 
   
 
 Messages
   
 
 
 :book:
 danger test finished.
   
 
   
   
   
   
 Generated by :no_entry_sign: http://github.com/danger/danger-js/";>dangerJS
   
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> [iOS] fix degrade_error not report 
> ---
>
> Key: WEEX-569
> URL: https://issues.apache.org/jira/browse/WEEX-569
> Project: Weex
>  Issue Type: Bug
>  Components: iOS
>Reporter: peihan
>Assignee: XuYouyang
>Priority: Major
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (WEEX-569) [iOS] fix degrade_error not report

2018-08-16 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/WEEX-569?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16582102#comment-16582102
 ] 

ASF GitHub Bot commented on WEEX-569:
-

weex-bot edited a comment on issue #1440: [WEEX-569][iOS] fix degrade_error not 
report
URL: https://github.com/apache/incubator-weex/pull/1440#issuecomment-413418453
 
 
   
   
   
   
   
   
 
   
 
 Messages
   
 
 
 :book:
 has no jsfm file changed.
   
 
   
 :book:
 jsfm test finished.
   
 
   
   
   
   
 Generated by :no_entry_sign: http://github.com/danger/danger-js/";>dangerJS
   
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> [iOS] fix degrade_error not report 
> ---
>
> Key: WEEX-569
> URL: https://issues.apache.org/jira/browse/WEEX-569
> Project: Weex
>  Issue Type: Bug
>  Components: iOS
>Reporter: peihan
>Assignee: XuYouyang
>Priority: Major
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (WEEX-569) [iOS] fix degrade_error not report

2018-08-15 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/WEEX-569?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16581938#comment-16581938
 ] 

ASF GitHub Bot commented on WEEX-569:
-

weex-bot edited a comment on issue #1440: [WEEX-569][iOS] fix degrade_error not 
report
URL: https://github.com/apache/incubator-weex/pull/1440#issuecomment-413418453
 
 
   
   
   
   
   
   
 
   
 
 Messages
   
 
 
 :book:
 No android file has been changed.
   
 
   
 :book:
 android build verification finished.
   
 
   
   
   
   
 Generated by :no_entry_sign: http://github.com/danger/danger-js/";>dangerJS
   
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> [iOS] fix degrade_error not report 
> ---
>
> Key: WEEX-569
> URL: https://issues.apache.org/jira/browse/WEEX-569
> Project: Weex
>  Issue Type: Bug
>  Components: iOS
>Reporter: peihan
>Assignee: XuYouyang
>Priority: Major
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (WEEX-569) [iOS] fix degrade_error not report

2018-08-15 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/WEEX-569?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16581935#comment-16581935
 ] 

ASF GitHub Bot commented on WEEX-569:
-

weex-bot edited a comment on issue #1440: [WEEX-569][iOS] fix degrade_error not 
report
URL: https://github.com/apache/incubator-weex/pull/1440#issuecomment-413418453
 
 
   
   
   
   
 
   
 
 Fails
   
 
 
 :no_entry_sign:
 Code file ios/sdk/WeexSDK/Sources/Protocol/WXApmProtocol.h does 
not have the copyright header.
   
 
   
   
   
   
 
   
 
 Warnings
   
 
 
 :warning:
 No Changelog changes!
   
 
   
   
   
   
 
   
 
 Messages
   
 
 
 :book:
 danger test finished.
   
 
   
   
   
   
 Generated by :no_entry_sign: http://github.com/danger/danger-js/";>dangerJS
   
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> [iOS] fix degrade_error not report 
> ---
>
> Key: WEEX-569
> URL: https://issues.apache.org/jira/browse/WEEX-569
> Project: Weex
>  Issue Type: Bug
>  Components: iOS
>Reporter: peihan
>Assignee: XuYouyang
>Priority: Major
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (WEEX-569) [iOS] fix degrade_error not report

2018-08-15 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/WEEX-569?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16581934#comment-16581934
 ] 

ASF GitHub Bot commented on WEEX-569:
-

weex-bot edited a comment on issue #1440: [WEEX-569][iOS] fix degrade_error not 
report
URL: https://github.com/apache/incubator-weex/pull/1440#issuecomment-413418453
 
 
   
   
   
   
   
   
 
   
 
 Messages
   
 
 
 :book:
 has no jsfm file changed.
   
 
   
 :book:
 jsfm test finished.
   
 
   
   
   
   
 Generated by :no_entry_sign: http://github.com/danger/danger-js/";>dangerJS
   
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> [iOS] fix degrade_error not report 
> ---
>
> Key: WEEX-569
> URL: https://issues.apache.org/jira/browse/WEEX-569
> Project: Weex
>  Issue Type: Bug
>  Components: iOS
>Reporter: peihan
>Assignee: XuYouyang
>Priority: Major
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (WEEX-569) [iOS] fix degrade_error not report

2018-08-15 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/WEEX-569?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16581925#comment-16581925
 ] 

ASF GitHub Bot commented on WEEX-569:
-

weex-bot edited a comment on issue #1440: [WEEX-569][iOS] fix degrade_error not 
report
URL: https://github.com/apache/incubator-weex/pull/1440#issuecomment-413418453
 
 
   
   
   
   
   
   
 
   
 
 Messages
   
 
 
 :book:
 No android file has been changed.
   
 
   
 :book:
 android build verification finished.
   
 
   
   
   
   
 Generated by :no_entry_sign: http://github.com/danger/danger-js/";>dangerJS
   
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> [iOS] fix degrade_error not report 
> ---
>
> Key: WEEX-569
> URL: https://issues.apache.org/jira/browse/WEEX-569
> Project: Weex
>  Issue Type: Bug
>  Components: iOS
>Reporter: peihan
>Assignee: XuYouyang
>Priority: Major
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (WEEX-569) [iOS] fix degrade_error not report

2018-08-15 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/WEEX-569?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16581922#comment-16581922
 ] 

ASF GitHub Bot commented on WEEX-569:
-

weex-bot commented on issue #1440: [WEEX-569][iOS] fix degrade_error not report
URL: https://github.com/apache/incubator-weex/pull/1440#issuecomment-413418453
 
 
   
   
   
   
 
   
 
 Fails
   
 
 
 :no_entry_sign:
 Code file ios/sdk/WeexSDK/Sources/Protocol/WXApmProtocol.h does 
not have the copyright header.
   
 
   
   
   
   
 
   
 
 Warnings
   
 
 
 :warning:
 No Changelog changes!
   
 
   
   
   
   
 
   
 
 Messages
   
 
 
 :book:
 danger test finished.
   
 
   
   
   
   
 Generated by :no_entry_sign: http://github.com/danger/danger-js/";>dangerJS
   
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> [iOS] fix degrade_error not report 
> ---
>
> Key: WEEX-569
> URL: https://issues.apache.org/jira/browse/WEEX-569
> Project: Weex
>  Issue Type: Bug
>  Components: iOS
>Reporter: peihan
>Assignee: XuYouyang
>Priority: Major
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (WEEX-569) [iOS] fix degrade_error not report

2018-08-15 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/WEEX-569?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16581924#comment-16581924
 ] 

ASF GitHub Bot commented on WEEX-569:
-

weex-bot edited a comment on issue #1440: [WEEX-569][iOS] fix degrade_error not 
report
URL: https://github.com/apache/incubator-weex/pull/1440#issuecomment-413418453
 
 
   
   
   
   
   
   
 
   
 
 Messages
   
 
 
 :book:
 has no jsfm file changed.
   
 
   
 :book:
 jsfm test finished.
   
 
   
   
   
   
 Generated by :no_entry_sign: http://github.com/danger/danger-js/";>dangerJS
   
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> [iOS] fix degrade_error not report 
> ---
>
> Key: WEEX-569
> URL: https://issues.apache.org/jira/browse/WEEX-569
> Project: Weex
>  Issue Type: Bug
>  Components: iOS
>Reporter: peihan
>Assignee: XuYouyang
>Priority: Major
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (WEEX-569) [iOS] fix degrade_error not report

2018-08-15 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/WEEX-569?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16581919#comment-16581919
 ] 

ASF GitHub Bot commented on WEEX-569:
-

lucky-chen opened a new pull request #1440: [WEEX-569][iOS] fix degrade_error 
not report
URL: https://github.com/apache/incubator-weex/pull/1440
 
 
   
   - fix degrade_error not report , by modify `WXSDKInstance.m`
   - add `NET` case in `WXErrorCodeGroup` 
   - report error msg when degrade_error
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> [iOS] fix degrade_error not report 
> ---
>
> Key: WEEX-569
> URL: https://issues.apache.org/jira/browse/WEEX-569
> Project: Weex
>  Issue Type: Bug
>  Components: iOS
>Reporter: peihan
>Assignee: XuYouyang
>Priority: Major
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)