Я не нашел способа сделать это с поведением по умолчанию в dojo, поэтому в качестве обходного пути я сделал небольшую утилиту для изменения структуры макета, прежде чем передать ее в сетку.(Вроде хака, но я сделал сетку в скрипте, а не с разметкой, так что пока она работает, и новая сетка все равно есть на чертежной доске ....
lib.wrapTryCatch = function(call, onException){
onException = onException || function(e){
console.log({wrappedException: e});
return e.message;
};
var f = function tryWrapper(){
try{
var val = call.apply(this, arguments);
return val;
}
catch(e){
return onException(e);
}
}
f.wrapped = call;
f.onException = onException;
return f;
}
lib.gridUtils = {
/** Convenience/debugging function to make exceptions visible
* if grid structure cells have errors.
*
* Puts exception to the console, instead of the grid's default
* behavior of dying silently
*
* */
decorateStructure: function(structure){
for(var idx in structure){
cell = structure[idx];
if('get' in cell){
cell.get = lib.wrapTryCatch(cell.get);
}
if('formatter' in cell){
cell.formatter = lib.wrapTryCatch(cell.formatter);
}
}
return structure;
}
}