diff --git a/karax/errors.nim b/karax/errors.nim index 847bd85..aedd103 100644 --- a/karax/errors.nim +++ b/karax/errors.nim @@ -8,6 +8,8 @@ var proc hasErrors*(): bool = gerrorCounter != 0 +proc hasError*(field: cstring): bool = gerrorMsgs.contains(field) and len(gerrorMsgs[field]) > 0 + proc disableOnError*(): cstring = toDisabled(hasErrors()) proc getError*(field: cstring): cstring =