-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Mark Fiers
committed
Nov 7, 2012
1 parent
fdc4223
commit dcbdb4d
Showing
1 changed file
with
21 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,59 +1,73 @@ | ||
# Copyright 2009-2011 Mark Fiers | ||
# The New Zealand Institute for Plant & Food Research | ||
# | ||
# | ||
# This file is part of Moa - http://github.com/mfiers/Moa | ||
# | ||
# | ||
# Licensed under the GPL license (see 'COPYING') | ||
# | ||
# | ||
|
||
|
||
class InvalidTemplate(Exception): | ||
pass | ||
|
||
|
||
class CannotGetAFileLock(Exception): | ||
"""Cannot get a file lock""" | ||
def __init__(self, f): | ||
self.d = dir | ||
|
||
def __str__(self): | ||
return "Cannot get a file lock on %s" % self.f | ||
|
||
|
||
class NotAMoaDirectory(Exception): | ||
"""This is not a moa directory""" | ||
def __init__(self, dir): | ||
self.dir = dir | ||
|
||
def __str__(self): | ||
return "%s is not a MOA directory" % self.dir | ||
|
||
|
||
class NotAMoaTemplate(Exception): | ||
"""This is not a valid moa template""" | ||
def __init__(self, template): | ||
self.template = template | ||
|
||
def __str__(self): | ||
return "%s is not a MOA template" % self.template | ||
|
||
|
||
class MoaFileError(Exception): | ||
"""Error handling a file """ | ||
def __str__(self): | ||
return "Moa error handling file" | ||
|
||
|
||
class MoaDirNotWritable(Exception): | ||
""" | ||
Moa directory is not writable | ||
""" | ||
def __str__(self): | ||
return "Moa directory (.moa) is not writable" | ||
|
||
|
||
class MoaCommandDoesNotExist(Exception): | ||
"""Command does not exists?""" | ||
def __str__(self): | ||
return "Command does not exist" | ||
|
||
|
||
|
||
class MoaPermissionDenied(Exception): | ||
"""Permission denied - you do not have the rights to perform this opperation """ | ||
"""Permission denied - you do not have the rights to perform this | ||
operation | ||
""" | ||
def __str__(self): | ||
return "Permission denied" | ||
|
||
|
||
class MoaInvalidCommandLine(Exception): | ||
"""Invalid command line""" | ||
def __str__(self): | ||
return "Invalid command line" | ||
|
||
return "Invalid command line" |