浏览代码

warning when "res" not found

Nicolas Cannasse 10 年之前
父节点
当前提交
6c08dcc4a8
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      hxd/res/FileTree.hx

+ 2 - 2
hxd/res/FileTree.hx

@@ -44,10 +44,10 @@ class FileTree {
 		}
 		var pos = Context.currentPos();
 		if( resolve )
-			dir = try Context.resolvePath(dir) catch( e : Dynamic ) Context.error("Resource directory not found in classpath '" + dir + "' (use -D resourcesPath=DIR)", pos);
+			dir = try Context.resolvePath(dir) catch( e : Dynamic ) { Context.warning("Resource directory not found in classpath '" + dir + "' (use -D resourcesPath=DIR)", pos); return "__invalid"; }
 		var path = sys.FileSystem.fullPath(dir);
 		if( !sys.FileSystem.exists(path) || !sys.FileSystem.isDirectory(path) )
-			Context.error("Resource directory does not exists '" + path + "'", pos);
+			Context.warning("Resource directory does not exists '" + path + "'", pos);
 		return path;
 	}