Summary:
Includes React Native and its dependencies Fresco, Metro, and Yoga. Excludes samples/examples/docs.
find: ^(?:( *)|( *(?:[\*~#]|::))( )? *)?Copyright (?:\(c\) )?(\d{4})\b.+Facebook[\s\S]+?BSD[\s\S]+?(?:this source tree|the same directory)\.$
replace: $1$2$3Copyright (c) $4-present, Facebook, Inc.\n$2\n$1$2$3This source code is licensed under the MIT license found in the\n$1$2$3LICENSE file in the root directory of this source tree.
Reviewed By: TheSavior, yungsters
Differential Revision: D7007050
fbshipit-source-id: 37dd6bf0ffec0923bfc99c260bb330683f35553e
Summary:
Output the reason for the error when failing to load source code. This was a big help when trying to diagnose https://github.com/facebook/react-native/issues/13299.
~~Unfortunately there still seems to be no way to get the offending line number (because `loadError.userInfo[RCTJSStackTraceKey]` is empty), but this is good enough.~~
Before:
```
[warn][tid:com.facebook.react.JavaScript][RCTBatchedBridge.m:510] Failed to execute source code. Unhandled JS Exception: SyntaxError
```
After:
```
[warn][tid:com.facebook.react.JavaScript][RCTJSCErrorHandling.mm:30] Couldn't get stack trace for http://localhost:8081/index.ios.bundle?platform=ios&dev=true&minify=false:81886
[warn][tid:com.facebook.react.JavaScript][RCTBatchedBridge.m:510] Failed to execute source code. Unhandled JS Exception: SyntaxError Unexpected keyword 'var'
```
Closes https://github.com/facebook/react-native/pull/13561
Differential Revision: D4908501
Pulled By: javache
fbshipit-source-id: a316dc70739b917b3cc690309d0ff37a8bb5d412