Better errors

This commit is contained in:
Jeffrey Morgan 2015-03-02 10:10:53 -05:00
parent 5b8be73288
commit 04239a39d4
3 changed files with 20 additions and 5 deletions

View File

@ -1,6 +1,6 @@
{
"name": "Kitematic",
"version": "0.5.4",
"version": "0.5.5",
"author": "Kitematic",
"description": "Simple Docker Container management for Mac OS X.",
"homepage": "https://kitematic.com/",

View File

@ -91,7 +91,9 @@ SetupStore.setup().then(machine => {
ContainerStore.init(function (err) {
if (err) {
console.log(err);
bugsnag.notify(err);
bugsnag.notify('ContainerStoreError', 'Could not init containerstore', {
error: err
});
}
router.transitionTo('containers');
});
@ -100,7 +102,10 @@ SetupStore.setup().then(machine => {
step: 'catch',
message: err.message
});
bugsnag.notify(err);
bugsnag.notify('SetupError', 'Setup threw an exception', {
step: 'catch',
error: err
});
console.log(err);
console.log(err.stack);
});

View File

@ -197,7 +197,12 @@ var SetupStore = assign(Object.create(EventEmitter.prototype), {
metrics.track('Setup Failed', {
step: step.name
});
bugsnag.notify(err);
var virtualboxVersion = virtualBox.installed() ? yield virtualBox.version() : 'Not installed';
bugsnag.notify('SetupError', 'Setup failed', {
error: err,
step: step.name,
virtualbox: virtualboxVersion
});
_error = err;
this.emit(this.ERROR_EVENT);
} else {
@ -220,7 +225,12 @@ var SetupStore = assign(Object.create(EventEmitter.prototype), {
step: 'done',
message: 'Machine URL not set'
});
bugsnag.notify('SetupError', 'Machine url was not set', info);
var virtualboxVersion = virtualBox.installed() ? yield virtualBox.version() : 'Not installed';
bugsnag.notify('SetupError', 'Machine url was not set', {
machine: info,
step: 'done',
virtualbox: virtualboxVersion
});
SetupStore.setError('Could not reach the Docker Engine inside the VirtualBox VM');
yield this.pause();
} else {