LiteDB
LiteDB copied to clipboard
String.FormatException in logger
https://github.com/mbdavid/LiteDB/blob/373c5e56cca061af4fd9362ad92f728f889f7bfe/LiteDB/Utils/Logger.cs#L69
This line can throw an exception if the args are empty but if the message string contains a substring that looks like "{0}".
Changing this line to the following fixes this error:
var text = args != null ? string.Format(message, args) : message;
https://github.com/mbdavid/LiteDB/blob/373c5e56cca061af4fd9362ad92f728f889f7bfe/LiteDB/Utils/Logger.cs#L69
This line can throw an exception if the args are empty but if the message string contains a substring that looks like "{0}".
Changing this line to the following fixes this error:
var text = args != null ? string.Format(message, args) : message;
The file 'Logger.cs' does not seem to exist anymore. However the issue you mentioned is found in the following file: FileException.cs You could say that this is proper behaviour since the expected arguments are not provided.