> > As for whether MW should use assertions, I don't remember/wasn't there for > the original discussion, so I can't comment on that, although personally I > don't see how they're that bad an idea.
I wasn't there either; but from my experience assertions are bad because you are using them to guard for unexpected behavior and to terminate upon detection. This is, usually, unexpected. IMO throw an exception if you're going to do this checking; then you at least get the stack trace (and function arguments!) for the last chance error handler; not to mention you're giving upstream code the chance to catch it in case it can be handled. ~Matt Walker Wikimedia Foundation Fundraising Technology Team On Tue, Jul 30, 2013 at 2:30 PM, Tyler Romeo <tylerro...@gmail.com> wrote: > On Tue, Jul 30, 2013 at 5:28 PM, Max Semenik <maxsem.w...@gmail.com> > wrote: > > > Warning: assert() [<a href='function.assert'>function.assert</a>]: > > Assertion failed in > > > /usr/local/apache/common-local/php-1.22wmf12/extensions/WikibaseDataModel/DataModel/Claim/Claims.php > > on line 291 > > > > Is this on a production server? If so then the even more confusing question > would be why assertions are enabled on an enterprise system... > > As for whether MW should use assertions, I don't remember/wasn't there for > the original discussion, so I can't comment on that, although personally I > don't see how they're that bad an idea. > > *-- * > *Tyler Romeo* > Stevens Institute of Technology, Class of 2016 > Major in Computer Science > www.whizkidztech.com | tylerro...@gmail.com > _______________________________________________ > Wikitech-l mailing list > Wikitech-l@lists.wikimedia.org > https://lists.wikimedia.org/mailman/listinfo/wikitech-l > _______________________________________________ Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l