brion(a)svn.wikimedia.org schreef
+// I don't really know what I'm doing in
the API and it might explode. ;)
Here's the bomb squad ;)
+ throw new MWException( "Invalid repo
{$args[0]}" );
Like with the previous module, you want to throw a regular
error here
rather than an MWException. MWExceptions are meant for things like weird
one-in-a-million race conditions and database errors, not for invalid
input. For normal error messages, use $this->dieUsage("Invalid repo
``{$args[0]}''", 'invalidrepo');
[snip rest]
Thanks for the education! :)
And for committing it before I got round to it. ;)
- -- brion
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.8 (Darwin)
Comment: Using GnuPG with Mozilla -
http://enigmail.mozdev.org
iEYEARECAAYFAkj2KmAACgkQwRnhpk1wk47wAwCdEzOmnkW7ekNgA83UfcIT+mDh
3eAAn28hn7azg28lBoUxyDMYw/N+orsa
=6LhG
-----END PGP SIGNATURE-----