Skip to content

Commit

Permalink
Merge pull request #1164 from spark/feature/long-function-message
Browse files Browse the repository at this point in the history
Fix error message for long function names
  • Loading branch information
m-mcgowan committed Nov 24, 2016
2 parents a31ec9f + 11f197f commit 1a1ee73
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions wiring/inc/spark_wiring_cloud.h
Expand Up @@ -78,7 +78,7 @@ class CloudClass {
static inline bool variable(const T &name, const Types& ... args)
{
static_assert(!IsStringLiteral(name) || sizeof(name) <= USER_VAR_KEY_LENGTH + 1,
"\n\nIn Particle.variable, name must be less than " __XSTRING(USER_VAR_KEY_LENGTH) " characters\n\n");
"\n\nIn Particle.variable, name must be " __XSTRING(USER_VAR_KEY_LENGTH) " characters or less\n\n");

return _variable(name, args...);
}
Expand Down Expand Up @@ -188,7 +188,7 @@ class CloudClass {
{
#if PLATFORM_ID!=3
static_assert(!IsStringLiteral(name) || sizeof(name) <= USER_FUNC_KEY_LENGTH + 1,
"\n\nIn Particle.function, name must be less than " __XSTRING(USER_FUNC_KEY_LENGTH) " characters\n\n");
"\n\nIn Particle.function, name must be " __XSTRING(USER_FUNC_KEY_LENGTH) " characters or less\n\n");
#endif
return _function(name, args...);
}
Expand Down

0 comments on commit 1a1ee73

Please sign in to comment.