Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

2008-07-30 Andreia Gaita <avidigal@novell.com>

        * browser.cs: Fix loader not to dump an exception when it a backend assembly
          doesn't exist. Change backend loading order.

svn path=/branches/mono-2-0/mono-tools/; revision=109219
  • Loading branch information...
commit 8817ddefe0d6774d8ebfffdc4d6c93fdcdc94a18 1 parent db78ea8
Andreia Gaita authored
Showing with 18 additions and 13 deletions.
  1. +6 −1 docbrowser/ChangeLog
  2. +12 −12 docbrowser/browser.cs
View
7 docbrowser/ChangeLog
@@ -1,8 +1,13 @@
+2008-07-30 Andreia Gaita <avidigal@novell.com>
+
+ * browser.cs: Fix loader not to dump an exception when it a backend assembly
+ doesn't exist. Change backend loading order.
+
2008-06-17 Andreia Gaita <avidigal@novell.com>
* browser.cs: Fix alternate engine loading so it tries every available
engine if the first one fails.
-
+
2008-06-15 Andreia Gaita <avidigal@novell.com>
* browser.cs: Uncomment exception message
View
24 docbrowser/browser.cs
@@ -22,7 +22,7 @@
namespace Monodoc {
class Driver {
- public static string[] engines = {"WebKit", "MonoWebBrowser", "Gecko", "GtkHtml"};
+ public static string[] engines = {"WebKit", "Gecko", "MonoWebBrowser", "GtkHtml"};
static int Main (string [] args)
{
@@ -2283,6 +2283,9 @@ void FocusOut (object sender, FocusOutEventArgs args)
private static IHtmlRender LoadRenderer (string dll, Browser browser) {
+ if (!System.IO.File.Exists (dll))
+ return null;
+
try {
Assembly ass = Assembly.LoadFile (dll);
System.Type type = ass.GetType ("Monodoc." + ass.GetName ().Name, false, false);
@@ -2312,18 +2315,15 @@ public static IHtmlRender GetRenderer (string engine, Browser browser)
foreach (string backend in Driver.engines) {
if (backend != engine) {
- string dll = System.IO.Path.Combine (AppDomain.CurrentDomain.BaseDirectory, backend + "HtmlRender.dll");
- if (System.IO.File.Exists (dll)) {
- renderer = LoadRenderer (dll, browser);
- if (renderer != null) {
- try {
- if (renderer.Initialize ()) {
- Console.WriteLine ("using " + renderer.Name);
- return renderer;
- }
- } catch (Exception ex) {
- Console.Error.WriteLine (ex);
+ renderer = LoadRenderer (System.IO.Path.Combine (AppDomain.CurrentDomain.BaseDirectory, backend + "HtmlRender.dll"), browser);
+ if (renderer != null) {
+ try {
+ if (renderer.Initialize ()) {
+ Console.WriteLine ("using " + renderer.Name);
+ return renderer;
}
+ } catch (Exception ex) {
+ Console.Error.WriteLine (ex);
}
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.