mirror of
https://github.com/deavmi/birchwood
synced 2024-09-20 13:22:52 +02:00
ConnInfo
- `getDB(string)` will now throw `BirchwoodException` with `ErrorType.DB_KEY_NOT_FOUND` if the key is not found Exceptions - Added member `DB_KEY_NOT_FOUND` to `ErrorType` enum
This commit is contained in:
parent
c53fc034d2
commit
fdcbcfeda4
@ -66,7 +66,12 @@ public enum ErrorType
|
|||||||
* If invalid parameters are passed
|
* If invalid parameters are passed
|
||||||
* to any of the text formatting functions
|
* to any of the text formatting functions
|
||||||
*/
|
*/
|
||||||
INVALID_FORMATTING
|
INVALID_FORMATTING,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* If a key-lookup in the ConnInfo failed
|
||||||
|
*/
|
||||||
|
DB_KEY_NOT_FOUND
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -136,8 +136,7 @@ public shared struct ConnectionInfo
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// TODO: Should throw an exception
|
throw new BirchwoodException(ErrorType.DB_KEY_NOT_FOUND, "Could not find key '"~key~"'");
|
||||||
return "";
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user