Browse Source

Merge remote-tracking branch 'origin/candidate-3.8.6' into candidate-3.8.x

Signed-off-by: Richard Chapman <rchapman@hpccsystems.com>
Richard Chapman 12 years ago
parent
commit
4fd1b04fdd

+ 16 - 6
common/fileview2/fvtransform.cpp

@@ -293,18 +293,28 @@ void ViewTransformerRegistry::addPlugins(const char * name)
     HqlParseContext parseCtx(dataServer, NULL);
     HqlLookupContext ctx(parseCtx, &errors);
     getRootScopes(scopes, dataServer, ctx);
+
     ForEachItemIn(i, scopes)
     {
         IHqlScope * scope = &scopes.item(i);
         HqlExprArray symbols;
-        scope->ensureSymbolsDefined(ctx);
-        scope->getSymbols(symbols);
+        try
+        {
+            scope->ensureSymbolsDefined(ctx);
+            scope->getSymbols(symbols);
 
-        ForEachItemIn(j, symbols)
+            ForEachItemIn(j, symbols)
+            {
+                IHqlExpression & cur = symbols.item(j);
+                if (cur.getOperator() == no_service)
+                    addServiceDefinition(&cur);
+            }
+        }
+        catch (IException * e)
         {
-            IHqlExpression & cur = symbols.item(j);
-            if (cur.getOperator() == no_service)
-                addServiceDefinition(&cur);
+            const char * name = scope->queryName()->str();
+            VStringBuffer msg("Error loading plugin %s", name);
+            EXCLOG(e, msg.str());
         }
     }
 }

+ 2 - 2
docs/ECLLanguageReference/ECLR_mods/ExtrSvcs-ExternalServicesImpl.xml

@@ -506,14 +506,14 @@
   
   #define EXAMPLELIB_VERSION "EXAMPLELIB 1.0.00"
   
-  const char * const HoleDefinition =
+  static const char * const HoleDefinition =
     "SYSTEM\n"
     "MODULE (SYSTEM)\n"
     " FUNCTION StringFind(string src, string search,
         unsigned4 instance),unsigned4,c,name('elStringFind')\n"
     "END\n";
   
-  const char * const EclDefinition =
+  static const char * const EclDefinition =
     "export ExampleLib := SERVICE\n"
     " unsigned integer4 StringFind(const string src,
         const string tofind, unsigned4 instance )

+ 1 - 1
plugins/auditlib/auditlib.cpp

@@ -25,7 +25,7 @@ static const char * compatibleVersions[] = {
     AUDITLIB_VERSION,
     NULL };
 
-const char * EclDefinition = 
+static const char * EclDefinition =
 "export AuditLib := SERVICE\n"
 "  boolean Audit(const string atype, const string msg) : c, action, volatile, entrypoint='alAudit', hole; \n"
 "  boolean AuditData(const string atype, const string msg, const data datablock) : c, action, volatile, entrypoint='alAuditData', hole; \n"

+ 1 - 1
plugins/debugservices/debugservices.cpp

@@ -21,7 +21,7 @@
 
 #define DEBUGSERVICES_VERSION "DEBUGSERVICES 1.0.1"
 
-const char * EclDefinition = 
+static const char * EclDefinition =
 "export DebugServices := SERVICE\n"
 "  Sleep(integer millis) : c,pure,entrypoint='dsSleep',initFunction='dsInitDebugServices'; \n"
 "  varstring GetBuildInfo() : c,pure,entrypoint='dsGetBuildInfo',initFunction='dsInitDebugServices';\n"

+ 2 - 2
plugins/examplelib/examplelib.cpp

@@ -24,9 +24,9 @@
 
 #define EXAMPLELIB_VERSION "EXAMPLELIB 1.0.00"
 
-const char * HoleDefinition = NULL;
+static const char * HoleDefinition = NULL;
 
-const char * EclDefinition = 
+static const char * EclDefinition =
 "export ExampleLib := SERVICE\n"
 "  string EchoString(const string src) : c, pure,entrypoint='elEchoString'; \n"
 "END;";

+ 1 - 1
plugins/fileservices/fileservices.cpp

@@ -48,7 +48,7 @@ static const char * compatibleVersions[] = {
     "FILESERVICES 2.1.3",
     NULL };
 
-const char * EclDefinition =
+static const char * EclDefinition =
 "export FsFilenameRecord := record string name{maxlength(1023)}; integer8 size; string19 modified; end; \n"
 "export FsLogicalFileName := string{maxlength(255)}; \n"
 "export FsLogicalFileNameRecord := record FsLogicalFileName name; end; \n"

+ 1 - 1
plugins/logging/logging.cpp

@@ -29,7 +29,7 @@ static const char * compatibleVersions[] = {
     LOGGING_VERSION,
     NULL };
 
-const char * EclDefinition = 
+static const char * EclDefinition =
 "export Logging := SERVICE\n"
 "  dbglog(const string src) : c,action,entrypoint='logDbgLog'; \n"
 "  addWorkunitInformation(const varstring txt, unsigned code=0, unsigned severity=0) : ctxmethod,action,entrypoint='addWuException'; \n"

+ 1 - 1
plugins/parselib/parselib.cpp

@@ -35,7 +35,7 @@ MODULE_INIT(INIT_PRIORITY_STANDARD)
 
 //-------------------------------------------------------------------------------------------------------------------------------------------
 
-const char * EclDefinition = 
+static const char * EclDefinition =
 "export ParseLib := SERVICE\n"
 "   string getParseTree() : c,volatile,entrypoint='plGetDefaultParseTree',userMatchFunction; \n"
 "   string getXmlParseTree() : c,volatile,entrypoint='plGetXmlParseTree',userMatchFunction; \n"

+ 1 - 1
plugins/stringlib/stringlib.cpp

@@ -39,7 +39,7 @@ static const char * compatibleVersions[] = {
 
 #define STRINGLIB_VERSION "STRINGLIB 1.1.14"
 
-const char * EclDefinition =  
+static const char * EclDefinition =
 "export StringLib := SERVICE\n"
 "  string StringFilterOut(const string src, const string _within) : c, pure,entrypoint='slStringFilterOut'; \n"
 "  string StringFilter(const string src, const string _within) : c, pure,entrypoint='slStringFilter'; \n"

+ 6 - 6
plugins/unicodelib/unicodelib.cpp

@@ -32,13 +32,13 @@
 
 #define UNICODELIB_VERSION "UNICODELIB 1.1.06"
 
-UChar32 const u32comma = ',';
-UChar32 const u32space = ' ';
-UChar const u16asterisk = '*';
-UChar const u16query = '?';
-UChar const u16space = ' ';
+static UChar32 const u32comma = ',';
+static UChar32 const u32space = ' ';
+static UChar const u16asterisk = '*';
+static UChar const u16query = '?';
+static UChar const u16space = ' ';
 
-const char * EclDefinition = 
+static const char * EclDefinition =
 "export UnicodeLib := SERVICE\n"
 "  unicode UnicodeFilterOut(const unicode src, const unicode _within) : c, pure,entrypoint='ulUnicodeFilterOut'; \n"
 "  unicode UnicodeFilter(const unicode src, const unicode _within) : c, pure,entrypoint='ulUnicodeFilter'; \n"

+ 1 - 1
plugins/workunitservices/workunitservices.cpp

@@ -59,7 +59,7 @@ static const char * compatibleVersions[] = {
     "WORKUNITSERVICES 1.0.1", 
     NULL };
 
-const char * EclDefinition = 
+static const char * EclDefinition =
 "export WsWorkunitRecord := record "
                             " string24 wuid;"
                             " string owner{maxlength(64)};"