refactor: consolidate [x]TooLongErrors into StringTooLongError

This commit is contained in:
spiral
2021-09-13 01:13:57 -04:00
parent b9d090d8cf
commit bae883c11f
6 changed files with 15 additions and 15 deletions

View File

@@ -30,7 +30,7 @@ namespace PluralKit.Bot
var systemName = ctx.RemainderOrNull();
if (systemName != null && systemName.Length > Limits.MaxSystemNameLength)
throw Errors.SystemNameTooLongError(systemName.Length);
throw Errors.StringTooLongError("System name", systemName.Length, Limits.MaxSystemNameLength);
var system = _db.Execute(async c =>
{