From: erickson Date: Wed, 15 Sep 2010 02:30:32 +0000 (+0000) Subject: added useful exception that is typical w/ autofieldwidget when an IDL class is not... X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=d1030bbbc229bef108b5947cd65957cdc2abe84c;p=contrib%2FConifer.git added useful exception that is typical w/ autofieldwidget when an IDL class is not defined git-svn-id: svn://svn.open-ils.org/ILS/trunk@17667 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/web/js/dojo/openils/widget/AutoFieldWidget.js b/Open-ILS/web/js/dojo/openils/widget/AutoFieldWidget.js index d94fd41655..84bdb760d1 100644 --- a/Open-ILS/web/js/dojo/openils/widget/AutoFieldWidget.js +++ b/Open-ILS/web/js/dojo/openils/widget/AutoFieldWidget.js @@ -358,6 +358,8 @@ if(!dojo._hasResource['openils.widget.AutoFieldWidget']) { _getLinkSelector : function() { var linkClass = this.idlField['class']; if(this.idlField.reltype != 'has_a') return false; + if(!fieldmapper.IDL.fmclasses[linkClass]) // class neglected by AutoIDL + throw new Error("IDL Class '" + linkClass + "' not defined"); if(!fieldmapper.IDL.fmclasses[linkClass].permacrud) return false; if(!fieldmapper.IDL.fmclasses[linkClass].permacrud.retrieve) return false;