summaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorTyge Løvset <[email protected]>2023-01-18 17:31:06 +0100
committerTyge Løvset <[email protected]>2023-01-18 18:03:25 +0100
commit5503f7a513a21f833bdba1d70973deaafb2f7a96 (patch)
tree9f17c350650ec81d8598fe68752c25cbf5115621 /include
parent90aab650b31febadcea45cfa60d0620b4d807ee9 (diff)
downloadSTC-modified-5503f7a513a21f833bdba1d70973deaafb2f7a96.tar.gz
STC-modified-5503f7a513a21f833bdba1d70973deaafb2f7a96.zip
Improved error messages.
Diffstat (limited to 'include')
-rw-r--r--include/stc/priv/template.h16
1 files changed, 9 insertions, 7 deletions
diff --git a/include/stc/priv/template.h b/include/stc/priv/template.h
index 4667f885..de0c8f0d 100644
--- a/include/stc/priv/template.h
+++ b/include/stc/priv/template.h
@@ -54,7 +54,7 @@
#if !(defined i_key || defined i_key_str || defined i_key_ssv || \
defined i_keyclass || defined i_keyboxed)
#if defined _i_ismap
- #error "i_key* must be defined for maps."
+ #error "i_key* must be defined for maps"
#endif
#if defined i_val_str
@@ -156,11 +156,11 @@
#endif
#if !defined i_key
- #error "no i_key or i_val defined"
+ #error "No i_key or i_val defined"
#elif defined i_keyraw ^ defined i_keyto
- #error "both i_***raw and i_***to must be defined, if any"
+ #error "Both i_xxxraw and i_xxxto must be defined, if any"
#elif defined i_keyfrom && !defined i_keyraw
- #error "i_***from defined without i_***raw"
+ #error "i_xxxfrom defined without i_xxxraw"
#elif defined i_from || defined i_drop
#error "i_from / i_drop not supported. Define i_keyfrom/i_valfrom and/or i_keydrop/i_valdrop instead"
#endif
@@ -168,8 +168,10 @@
#ifndef i_tag
#define i_tag i_key
#endif
-#if c_option(c_no_clone) || (!defined i_keyclone && (defined i_keydrop || defined i_keyraw))
+#if c_option(c_no_clone)
#define i_no_clone
+#elif !(defined i_keyclone || defined i_no_clone) && (defined i_keydrop || defined i_keyraw)
+ #error i_xxxclone should be defined when i_xxxdrop or i_xxxraw is defined
#endif
#ifndef i_keyraw
#define i_keyraw i_key
@@ -244,8 +246,8 @@
#error "i_val* must be defined for maps"
#endif
-#if !defined i_valclone && (defined i_valdrop || defined i_valraw)
- #define i_no_clone
+#if !(defined i_valclone || defined i_no_clone) && (defined i_valdrop || defined i_valraw)
+ #error i_valclone should be defined when i_valdrop or i_valraw is defined
#endif
#ifndef i_valraw
#define i_valraw i_val