本文整理汇总了TypeScript中bluebird.longStackTraces函数的典型用法代码示例。如果您正苦于以下问题:TypeScript longStackTraces函数的具体用法?TypeScript longStackTraces怎么用?TypeScript longStackTraces使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了longStackTraces函数的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的TypeScript代码示例。
示例1: function
var setGlobals = function () {
var Promise = require('bluebird');
Promise.longStackTraces();
global.Promise = Promise;
var Mapstrace = require('mapstrace');
Promise.promisifyAll(Mapstrace);
global.PrettyError = function (err, msg, cb) {
return Mapstrace.build(err, true, function (result) {
sails.log.error(msg);
sails.log.error(err.toString() + ':\n' + Mapstrace.stringify(result));
if (cb) cb();
})
};
process.on("unhandledRejection", function (error, promise) {
PrettyError(error, '[Bluebird]Unhandled rejection:', function () {
sails.log.error('From promise:', promise)
});
});
process.on("uncaughtException", function (error) {
PrettyError(error, 'An uncaught exception has caused Node.js to crash!', function () {
process.exit(1);
});
});
if (sails.config.environment === 'production') {
sails.hooks.http.app.locals.assetPrefix = '/assets'
} else {
sails.hooks.http.app.locals.assetPrefix = '/assets'
}
};
开发者ID:ModMountain,项目名称:web-old,代码行数:31,代码来源:bootstrap.ts
示例2: require
// Main control plane.
var Promise = require("bluebird");
Promise.longStackTraces();
var KubernetesClient = require("./kubernetes-rest.js");
var chalk = require("chalk");
var cmdln = require("cmdln");
var util = require("util");
var logger = require("./logger");
var Project = require("./project");
var Resource = require("./resource");
var Diafile = require("./diafile");
var Errors = require("./errors");
var DiatropikonError = Errors.DiatropikonError;
var KubernetesError = Errors.KubernetesError;
// import Operation = require("./operation");
logger.debug("Starting Diatropikon...")
export class Diatropikon {
operations: Operation[]
开发者ID:orospakr,项目名称:diatropikon,代码行数:30,代码来源:diatropikon.ts
示例3:
import * as chai from "chai";
import * as chaiAsPromised from "chai-as-promised";
import * as Bluebird from "bluebird";
import * as sourceMapSupport from "source-map-support";
Bluebird.longStackTraces();
sourceMapSupport.install({
handleUncaughtExceptions: false
});
chai.use(chaiAsPromised);
开发者ID:SierraSoftworks,项目名称:Iridium,代码行数:11,代码来源:chai.ts
注:本文中的bluebird.longStackTraces函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论