diff options
Diffstat (limited to 'bitbake/lib')
-rw-r--r-- | bitbake/lib/bb/ui/hob.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/bitbake/lib/bb/ui/hob.py b/bitbake/lib/bb/ui/hob.py index 750ab28b31..919c06e151 100644 --- a/bitbake/lib/bb/ui/hob.py +++ b/bitbake/lib/bb/ui/hob.py | |||
@@ -115,6 +115,21 @@ class MainWindow (gtk.Window): | |||
115 | self.set_busy_cursor(False) | 115 | self.set_busy_cursor(False) |
116 | 116 | ||
117 | gtk.main_quit() | 117 | gtk.main_quit() |
118 | |||
119 | """ | ||
120 | In the case of a fatal error give the user as much information as possible | ||
121 | and then exit. | ||
122 | """ | ||
123 | def fatal_error_cb(self, handler, errormsg, phase): | ||
124 | lbl = "<b>Error!</b>\nThere was an unrecoverable error during the" | ||
125 | lbl = lbl + " <i>%s</i> phase of BitBake. This must be" % phase | ||
126 | lbl = lbl + " rectified before the GUI will function. The error" | ||
127 | lbl = lbl + " message which which caused this is:\n\n\"%s\"" % errormsg | ||
128 | dialog = CrumbsDialog(self, lbl, gtk.STOCK_DIALOG_ERROR) | ||
129 | dialog.add_button("Exit", gtk.RESPONSE_OK) | ||
130 | response = dialog.run() | ||
131 | dialog.destroy() | ||
132 | self.set_busy_cursor(False) | ||
118 | gtk.main_quit() | 133 | gtk.main_quit() |
119 | 134 | ||
120 | def scroll_tv_cb(self, model, path, it, view): | 135 | def scroll_tv_cb(self, model, path, it, view): |
@@ -963,6 +978,7 @@ def main (server, eventHandler): | |||
963 | configurator.connect("layers-loaded", layers.load_current_layers) | 978 | configurator.connect("layers-loaded", layers.load_current_layers) |
964 | configurator.connect("layers-changed", handler.reload_data) | 979 | configurator.connect("layers-changed", handler.reload_data) |
965 | handler.connect("config-found", configurator.configFound) | 980 | handler.connect("config-found", configurator.configFound) |
981 | handler.connect("fatal-error", window.fatal_error_cb) | ||
966 | 982 | ||
967 | try: | 983 | try: |
968 | # kick the while thing off | 984 | # kick the while thing off |