mirror of https://github.com/djcb/mu.git
error: Add some more error codes
This commit is contained in:
parent
a8a3a0c3bf
commit
3ac3ce7828
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
** Copyright (C) 2019-2020 Dirk-Jan C. Binnema <djcb@djcbsoftware.nl>
|
** Copyright (C) 2019-2022 Dirk-Jan C. Binnema <djcb@djcbsoftware.nl>
|
||||||
**
|
**
|
||||||
** This program is free software; you can redistribute it and/or modify it
|
** This program is free software; you can redistribute it and/or modify it
|
||||||
** under the terms of the GNU General Public License as published by the
|
** under the terms of the GNU General Public License as published by the
|
||||||
|
@ -21,7 +21,7 @@
|
||||||
#define MU_ERROR_HH__
|
#define MU_ERROR_HH__
|
||||||
|
|
||||||
#include <stdexcept>
|
#include <stdexcept>
|
||||||
#include "mu-utils.hh"
|
#include "mu-utils-format.hh"
|
||||||
#include "mu-util.h"
|
#include "mu-util.h"
|
||||||
#include <glib.h>
|
#include <glib.h>
|
||||||
|
|
||||||
|
@ -30,6 +30,7 @@ namespace Mu {
|
||||||
struct Error final : public std::exception {
|
struct Error final : public std::exception {
|
||||||
enum struct Code {
|
enum struct Code {
|
||||||
AccessDenied = 100, // don't overlap with MuError
|
AccessDenied = 100, // don't overlap with MuError
|
||||||
|
AssertionFailure,
|
||||||
Command,
|
Command,
|
||||||
Crypto,
|
Crypto,
|
||||||
File,
|
File,
|
||||||
|
@ -37,14 +38,16 @@ struct Error final : public std::exception {
|
||||||
Internal,
|
Internal,
|
||||||
InvalidArgument,
|
InvalidArgument,
|
||||||
Message,
|
Message,
|
||||||
|
NoMatches,
|
||||||
NotFound,
|
NotFound,
|
||||||
Parsing,
|
Parsing,
|
||||||
|
Play,
|
||||||
Query,
|
Query,
|
||||||
SchemaMismatch,
|
SchemaMismatch,
|
||||||
Store,
|
Store,
|
||||||
|
UnverifiedSignature,
|
||||||
User,
|
User,
|
||||||
Play,
|
Xapian,
|
||||||
AssertionFailure
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue