* See the License for the specific language governing permissions and
* limitations under the License.
*/
-
+require('../common/exception_handling');
const {wrt} = process.binding('wrt');
-const {EventEmitter} = require('events')
-const util = require('util')
+const {EventEmitter} = require('events');
+const util = require('util');
-Object.setPrototypeOf(Object.getPrototypeOf(wrt), EventEmitter.prototype)
+Object.setPrototypeOf(Object.getPrototypeOf(wrt), EventEmitter.prototype);
-module.exports = wrt
+module.exports = wrt;
console.log = console.error = console.warn = function(...args) {
wrt.log(util.format(...args));
};
process.stdout.write = process.stderr.write = function (chunk, encoding, callback) {
if (Buffer.isBuffer(chunk)) {
- chunk = chunk.toString(encoding)
+ chunk = chunk.toString(encoding);
}
- wrt.log(chunk)
+ wrt.log(chunk);
if (callback) {
- callback()
+ callback();
}
- return true
+ return true;
}
--- /dev/null
+process.on('uncaughtException', function (error) {
+ // Do nothing if the user has a custom uncaught exception handler.
+ var ref, stack
+ stack = (ref = error.stack) != null ? ref : error.name + ': ' + error.message
+ console.error('A JavaScript error occurred in pid ' + process.pid + '\n' + stack)
+});
* limitations under the License.
*/
+require('../common/exception_handling');
const wrtRenderer = require('./wrt_renderer');
require(wrtRenderer.getElectronPath() + '/renderer/init')
-
-process.on('uncaughtException', function (error) {
- // Do nothing if the user has a custom uncaught exception handler.
- var ref, stack
- stack = (ref = error.stack) != null ? ref : error.name + ': ' + error.message
- console.error('A JavaScript error occurred in the renderer process\n' + stack)
-})
'use strict';
-process.on('uncaughtException', function (error) {
- // Do nothing if the user has a custom uncaught exception handler.
- var ref, stack
- stack = (ref = error.stack) != null ? ref : error.name + ': ' + error.message
- console.error('A JavaScript error occurred in the main process\n' + stack)
-})
+require('../common/exception_handling');
new (require('./runtime'))({
devMode: false,