ios/Mobile/Document.mm |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit dfb30386090c8d1334bd6951d497d08fb3ab3a5b
Author:     Tor Lillqvist <[email protected]>
AuthorDate: Tue Dec 18 20:39:18 2018 +0200
Commit:     Andras Timar <[email protected]>
CommitDate: Mon Mar 4 15:46:53 2019 +0100

    Don't crash if there is no WKJavaScriptExceptionMessage
    
    Change-Id: I90b99ba13e06c511334bc085d43d85126808f42f
    Reviewed-on: https://gerrit.libreoffice.org/68326
    Reviewed-by: Andras Timar <[email protected]>
    Tested-by: Andras Timar <[email protected]>

diff --git a/ios/Mobile/Document.mm b/ios/Mobile/Document.mm
index 285e660d9..af4ae0a75 100644
--- a/ios/Mobile/Document.mm
+++ b/ios/Mobile/Document.mm
@@ -133,7 +133,10 @@
                                               completionHandler:^(id _Nullable 
obj, NSError * _Nullable error)
                      {
                          if (error) {
-                             LOG_ERR("Error after " << [js UTF8String] << ": " 
<< [error.userInfo[@"WKJavaScriptExceptionMessage"] UTF8String]);
+                             LOG_ERR("Error after " << [js UTF8String] << ": " 
<< [[error localizedDescription] UTF8String]);
+                             NSString *jsException = 
error.userInfo[@"WKJavaScriptExceptionMessage"];
+                             if (jsException != nil)
+                                 LOG_ERR("JavaScript exception: " << 
[jsException UTF8String]);
                          }
                      }
                  ];
_______________________________________________
Libreoffice-commits mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to