* driver.cs: Report an error if the resource file is not found
instead of crashing.
svn path=/trunk/mcs/; revision=8317
2002-10-16 Miguel de Icaza <miguel@ximian.com>
+ * driver.cs: Report an error if the resource file is not found
+ instead of crashing.
+
* ecore.cs (PropertyExpr.EmitAssign): Pass IsBase instead of
false, like Emit does.
margs [1] = spec.Substring (0, cp);
} else
margs [0] = margs [1] = spec;
- embed_res.Invoke (CodeGen.AssemblyBuilder, margs);
+
+ if (File.Exists ((string) margs [0]))
+ embed_res.Invoke (CodeGen.AssemblyBuilder, margs);
+ else {
+ Report.Error (1566, "Can not find the resource " + margs [0]);
+ }
}
}
}
+
+ if (Report.Errors > 0)
+ return false;
CodeGen.Save (output_file);
if (timestamps) {