[ckan-dev] Ckan Exceptions and translation

Adrià Mercader adria.mercader at okfn.org
Wed Apr 17 10:14:26 UTC 2013


I'm generally +1 on not translating any exceptions, but as you say we
then need to make sure that they are captured by the controllers or
whatever before showing them on the frontend.


Adrià

On 16 April 2013 15:17, Toby Dacre <toby.okfn at gmail.com> wrote:
> Hi,
>
> I see code like this
>     `raise Exception(_('some error'))`
>
> I think these should be
>     `raise Exception('some error')`
>
> In my view Exceptions are for developers and log files etc so we should not
> be pushing the Exception message to the user.  By using _ our error logs
> will be in the language of the user who had the error not in English like
> the code base.  This make support much more difficult.
>
> This is a new thing that has started happening.  Can anyone justify this
> change?  Can we stop doing it?
>
> Toby
>
> _______________________________________________
> ckan-dev mailing list
> ckan-dev at lists.okfn.org
> http://lists.okfn.org/mailman/listinfo/ckan-dev
> Unsubscribe: http://lists.okfn.org/mailman/options/ckan-dev
>




More information about the ckan-dev mailing list