[GRASS-dev] Unify python GRASS defined exception in one common file
peter.zamb at gmail.com
Mon Jul 7 05:39:22 PDT 2014
On Fri, Jul 4, 2014 at 8:53 AM, Luca Delucchi <lucadeluge at gmail.com> wrote:
> On 3 July 2014 17:35, Pietro <peter.zamb at gmail.com> wrote:
>> What do you think if we unify all our custom exceptions in one common file?
>> Just to avoid code repetitions and help consistency.
>> Perhaps we could create a new file in grass.script.errors or
>> grass.script.exceptions, or outside script so something like
>> grass.errors or grass.exceptions.
>> Do you think it is a bad idea?
> If it is possible without create problems I think it is a good idea...
yes, I think so.
Personally I think that the exception should stay outside the
grass.script directory, because they are general and are also used in
the grass (gui/lib) libraries.
So If there are not opponents I would create an exception file in
/lib/python/exceptions.py with all the definitions.
Let me know.
More information about the grass-dev