partkeepr

fork of partkeepr
git clone https://git.e1e0.net/partkeepr.git
Log | Files | Refs | Submodules | README | LICENSE

commit 0af2c7601ce90c12f99d8c95e6467de713f19624
parent 9d043315c80c0de34cb9c1f48c2b91209e3d25d9
Author: Felicitus <felicitus@felicitus.org>
Date:   Tue, 10 Jul 2012 03:51:17 +0200

Added method to allow any part of the system to trigger a RuntimeError just by passing an error string
Diffstat:
Msrc/frontend/js/PartKeepr.js | 13+++++++++++++
1 file changed, 13 insertions(+), 0 deletions(-)

diff --git a/src/frontend/js/PartKeepr.js b/src/frontend/js/PartKeepr.js @@ -177,6 +177,19 @@ Ext.application({ this.centerPanel.removeAll(true); this.getSessionManager().logout(); }, + /** + * Handles a runtime error. + * + * @param error A string indicating which error has occured. + */ + raiseRuntimeError: function (error) { + var exception = { + message: i18n("Runtime Error"), + detail: error + }; + + PartKeepr.ExceptionWindow.showException(exception); + }, createGlobalStores: function () { this.footprintStore = Ext.create("Ext.data.Store", {