Improve error handling
- catch errors while loading themes - use user's actual home directory to look for config files - restructure main function
This commit is contained in:
parent
ea83f1aabf
commit
bbe6cd830f
3 changed files with 90 additions and 34 deletions
|
|
@ -25,8 +25,9 @@ defaultConfig = Config
|
|||
, cTaskDB = "~/.taskmachine/tasks.db"
|
||||
}
|
||||
|
||||
defaultConfigFilePaths :: [FilePath]
|
||||
defaultConfigFilePaths = ["tasks.conf", "~/.taskmachine/tasks.conf"]
|
||||
defaultConfigFilePaths :: FilePath -> [FilePath]
|
||||
defaultConfigFilePaths homedir =
|
||||
[homedir ++ "/.taskmachine/tasks.conf", "tasks.conf"]
|
||||
|
||||
newtype CPException = CPException C.CPErrorData
|
||||
deriving (Show)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue