瀏覽代碼

Use throwUnexpected

Renato Golin 13 年之前
父節點
當前提交
461eab34f7
共有 3 個文件被更改,包括 5 次插入5 次删除
  1. 2 2
      dali/sasha/salds.cpp
  2. 2 2
      system/jlib/jfile.cpp
  3. 1 1
      system/xmllib/xalan_processor.ipp

+ 2 - 2
dali/sasha/salds.cpp

@@ -31,8 +31,8 @@ class CLargeDataStore: public CInterface, implements ILargeDataStore
             if (!isAbsolutePath(ldsrootdir)) {
                 char cpath[_MAX_DIR];
                 if (!GetCurrentDirectory(_MAX_DIR, cpath)){
-                    ERRLOG("CLargeDataStore::main: Current directory path too big, setting it to null");
-                    cpath[0] = 0;
+                    ERRLOG("CLargeDataStore::main: Current directory path too big, bailing out");
+                    throwUnexpected();
                 }
                 basedir.append(cpath);
                 if (*ldsrootdir)

+ 2 - 2
system/jlib/jfile.cpp

@@ -2961,7 +2961,7 @@ StringBuffer &createUNCFilename(const char * filename, StringBuffer &UNC, bool u
         {
             if (!GetCurrentDirectory(sizeof(buf), buf)) {
                 ERRLOG("createUNCFilename: Current directory path too big, bailing out");
-                assertex(false);
+                throwUnexpected();
             }
             UNC.append(buf).append("/");
         }
@@ -4310,7 +4310,7 @@ void RemoteFilename::setPath(const SocketEndpoint & _ep, const char * _filename)
             char dir[_MAX_PATH];
             if (!GetCurrentDirectory(sizeof(dir), dir)) {
                 ERRLOG("RemoteFilename::setPath: Current directory path too big, bailing out");
-                assertex(false);
+                throwUnexpected();
             }
             if (*filename==PATHSEPCHAR) {
 #ifdef _WIN32

+ 1 - 1
system/xmllib/xalan_processor.ipp

@@ -128,7 +128,7 @@ public:
                     char baseurl[1024];
                     if (!GetCurrentDirectory(1024, baseurl)) {
                         ERRLOG("MemSourceResolver::resolveEntity: Current directory path too big, bailing out");
-                        assertex(false);
+                        throwUnexpected();
                     }
                     path.append(URLPREFIX).append(baseurl).append(PATHSEPSTR);
                 }