如标题中所述,我的sails app对特定路由/控制器函数的GET请求在开发环境中返回带有JSON的badRequest,但不在prod环境中返回.为什么是这样?
这是控制器功能:
index: function(req, res) {
async.auto({
companies: function(cb) {
User.findOneById(req.session.user.id)
.populate('companies')
.exec(function(err, user)
{
if(err) {
var badRequestData = { error: err };
return cb(badRequestData, null);
} else if(user.companies.length == 0) {
var badRequestData = { error: "This user has no associated companies." };
return cb(badRequestData, null);
}
cb(null, user.companies)
});
},
validateForNullCompanies: ['companies', function(cb, results) {
var nullCompanies = _.where(results.companies, { stripeAccountId: null });
if(nullCompanies.length > 0) {
var badRequestData = { error: "This user needs to …Run Code Online (Sandbox Code Playgroud) 我已经开始通过Test Flight测试我的应用程序,并且我不时收到此错误:_sigtramp + 42.它仅在应用程序启动时发生,目前仅在iOS 6.0上发生.有没有其他人遇到这个或你能帮助我找出出错的地方吗?

这就是它的样子.我想让黑色背景清晰,似乎无法弄明白.

这是loadView:
Run Code Online (Sandbox Code Playgroud)loadView { CGRect frame = CGRectMake(screenWidth - OFFSET, DEFAULT_PADDING, 140, 40); miniC* mcView = [ [ [miniC alloc] initWithFrame:frame] autorelease]; mcView.autoresizingMask = UIViewAutoresizingFlexibleLeftMargin; [[self view] addSubview:mcView]; }
这是我在miniC中调用drawRect的地方:
- (void)drawRect:(CGRect)rect {
CGContextRef context = UIGraphicsGetCurrentContext();
// Set Background Color & Border Color
CGColorRef bgColor = [UIColor scrollViewTexturedBackgroundColor].CGColor;
CGColorRef borderColor = [UIColor grayColor].CGColor;
CGRect Rect = self.bounds;
// Round Corners
roundCorners(context, Rect);
// Fill with bgcolor
fillBackgroundColor(context, Rect, bgColor);
// Add 1 px stroke
CGRect strokeRect = Rect;
strokeRect.size.height …Run Code Online (Sandbox Code Playgroud) ios ×2
iphone ×2
ipad ×1
node.js ×1
objective-c ×1
regex ×1
sails.js ×1
sqlite ×1
stack-trace ×1
testflight ×1