Index: apachesolr_search.admin.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/apachesolr/Attic/apachesolr_search.admin.inc,v
retrieving revision 1.1.2.1
diff -u -p -r1.1.2.1 apachesolr_search.admin.inc
--- apachesolr_search.admin.inc	9 Dec 2008 01:01:29 -0000	1.1.2.1
+++ apachesolr_search.admin.inc	9 Dec 2008 14:28:38 -0000
@@ -10,13 +10,23 @@
  * Menu callback - the settings form.
  */
 function apachesolr_search_settings_page() {
-  return drupal_get_form('apachesolr_search_settings_form');
+    // try to fetch the schema fields
+  try {
+    $solr = apachesolr_get_solr();
+    $fields = $solr->getFields();
+    return drupal_get_form('apachesolr_search_settings_form', $fields);
+  }
+  catch (Exception $e) {
+    watchdog('apachesolr', $e->getMessage());
+    drupal_set_message($e->getMessage(), "warning");
+    return t('Cannot get information about the fields in the index at this time.');
+  }
 }
 
 /**
  * Form builder function to set query field weights.
  */
-function apachesolr_search_settings_form() {
+function apachesolr_search_settings_form($fields) {
   $form = array();
 
   // get the current weights
@@ -40,9 +50,6 @@ function apachesolr_search_settings_form
   if (!$qf) {
     $qf = $defaults;
   }
-  // try to fetch the schema fields
-  $solr = apachesolr_get_solr();
-  $fields = $solr->getFields();
   if ($fields) {
 
     $form['apachesolr_search_query_fields'] = array(
