Selaa lähdekoodia

Merge branch 'closedown-5.0.x'

Signed-off-by: Richard Chapman <rchapman@hpccsystems.com>
Richard Chapman 10 vuotta sitten
vanhempi
commit
0890ebbe0d
4 muutettua tiedostoa jossa 11 lisäystä ja 9 poistoa
  1. 1 7
      ecl/eclagent/eclagent.cpp
  2. 2 2
      ecl/eclagent/eclagent.ipp
  3. 6 0
      system/jlib/jstring.cpp
  4. 2 0
      system/jlib/jstring.hpp

+ 1 - 7
ecl/eclagent/eclagent.cpp

@@ -95,12 +95,6 @@ MODULE_EXIT()
 
 //-----------------------------------------------------------------------------------------------------
 
-inline const char * nullText(const char * text)
-{
-    if (text) return text;
-    return "(null)";
-}
-
 inline const char * ensureText(const char * text)
 {
     if (text) return text;
@@ -741,7 +735,7 @@ IConstWUResult *EclAgent::getExternalResult(const char * wuid, const char *name,
     }
     else
     {
-        fail(0, "Missing or invalid workunit name in getExternalResult()");
+        failv(0, "Missing or invalid workunit name %s in getExternalResult()", nullText(wuid));
     }
 }
 

+ 2 - 2
ecl/eclagent/eclagent.ipp

@@ -514,8 +514,8 @@ public:
         if(workflow) workflow->returnPersistVersion(logicalName, eclCRC, allCRC, isFile);
     }
 
-    virtual void fail(int code, char const * str); 
-    void failv(int code, char const * fmt, ...) __attribute__((format(printf, 3, 4)));
+    virtual void fail(int code, char const * str);
+    void failv(int code, char const * fmt, ...) __attribute__((format(printf, 3, 4), noreturn));
     virtual int queryLastFailCode();
     virtual void getLastFailMessage(size32_t & outLen, char * & outStr, const char * tag);
     virtual void getEventName(size32_t & outLen, char * & outStr);

+ 6 - 0
system/jlib/jstring.cpp

@@ -2350,3 +2350,9 @@ StringBuffer & elideString(StringBuffer & s, unsigned maxLength)
     }
     return s;
 }
+
+const char * nullText(const char * text)
+{
+    if (text) return text;
+    return "(null)";
+}

+ 2 - 0
system/jlib/jstring.hpp

@@ -540,4 +540,6 @@ extern jlib_decl char *j_strtok_r(char *str, const char *delim, char **saveptr);
 extern jlib_decl int j_memicmp (const void *s1, const void *s2, size32_t len); 
 extern jlib_decl size32_t memcount(size32_t len, const char * str, char search);
 
+extern jlib_decl const char * nullText(const char * text);
+
 #endif