Re: [Wikitech-l] On InvalidArgumentException and user-facing errors

2017-12-07 Thread Chad
On Thu, Dec 7, 2017 at 12:24 PM Bartosz Dziewoński wrote: > On 2017-12-07 21:05, Chad wrote: > > Yeah, and when you throw ErrorPageError deep enough in a code path, it > can > > explode on cli operations. I've seen this before. > > Indeed you did, you even fixed this bug a

Re: [Wikitech-l] On InvalidArgumentException and user-facing errors

2017-12-07 Thread Bartosz Dziewoński
On 2017-12-07 21:05, Chad wrote: Yeah, and when you throw ErrorPageError deep enough in a code path, it can explode on cli operations. I've seen this before. Indeed you did, you even fixed this bug a couple months ago ;) I'm pretty sure it's safe to use now.

Re: [Wikitech-l] On InvalidArgumentException and user-facing errors

2017-12-07 Thread Chad
On Thu, Dec 7, 2017 at 11:15 AM Bartosz Dziewoński wrote: > For "expected" exceptions, you can throw ErrorPageError or one of its > subclasses, which is handled internally to produce a pretty user-facing > error page. > > Yeah, and when you throw ErrorPageError deep enough

Re: [Wikitech-l] On InvalidArgumentException and user-facing errors

2017-12-07 Thread Bartosz Dziewoński
For "expected" exceptions, you can throw ErrorPageError or one of its subclasses, which is handled internally to produce a pretty user-facing error page. -- Bartosz Dziewoński ___ Wikitech-l mailing list Wikitech-l@lists.wikimedia.org

Re: [Wikitech-l] On InvalidArgumentException and user-facing errors

2017-12-07 Thread Chad
On Thu, Dec 7, 2017 at 11:07 AM Daniel Kinzler wrote: > Am 07.12.2017 um 19:48 schrieb Chad: > > Basically the short version is: exceptions should only be shown to users > in > > the situation of *actual software errors*. They're the exception, not the > > norm. What

[Wikitech-l] Last Call: MediaWiki 1.30 Release Candidate 0

2017-12-07 Thread Cindy Cicalese
We are getting ready to release MediaWiki 1.30 - probably tomorrow. If you have found any bugs while testing Release Candidate 0, please report them now. Thanks! Cindy __ Cindy Cicalese Product Manager, MediaWiki Platform Wikimedia Foundation > Begin forwarded

Re: [Wikitech-l] On InvalidArgumentException and user-facing errors

2017-12-07 Thread Daniel Kinzler
Am 07.12.2017 um 19:48 schrieb Chad: > Basically the short version is: exceptions should only be shown to users in > the situation of *actual software errors*. They're the exception, not the > norm. What we *should* do in such situation is log the error (at the > ERROR/WARNING/etc level as

[Wikitech-l] On InvalidArgumentException and user-facing errors

2017-12-07 Thread Chad
Hi! Recently it seems as though there's been a huge increase in the use of exceptions within the MediaWiki ecosystem. That's perfectly fine. Exceptions are fantastic and a standard part of any developer's toolkit. However, there seems to be a trend in throwing exceptions for codepaths that don't

Re: [Wikitech-l] Fwd: Re: [Wikidata] Imperative programming in Lua, do we really want it?

2017-12-07 Thread Brian Wolff
Lua is used for many purposes - some of which I think are well suited to an imperaive approach (or at least would be totally fine to do in an imperative style). There are of course many cases where an imperative approach would be a poor choice. There are no rules that apply to all programming

Re: [Wikitech-l] Can we drop revision hashes (rev_sha1)?

2017-12-07 Thread Daniel Kinzler
Am 06.12.2017 um 22:09 schrieb John Erling Blad: > What is the current state, will some kind of digest be retained? The current plan is to keep the SHA1 hash, one for each slot, and an aggregate one for the revision. If there is only one slot, the revision hash is the same as the slat hash. --