Hello,
I'm using the Rally SDK2 Lookback API from Javascript to retrieve some features at some dates in the past. It appears that, sometimes, my store fails to load data and triggers a network exception I'm unable to catch...
I tried to add some exception handlers at many place but there are never triggered: in the store, in the model, in the proxy, as events, as an exceptionHandler property, etc.
Here is my piece of code:
function loadFeaturesHistorical() {
console.log(' - search for features...');
var features = Ext.create('Rally.data.lookback.SnapshotStore', {
fetch: ['FormattedID', '_ValidFrom', '_ValidTo'],
context: {
workspace: gvRallyWorkspace,
project: gvRallyProject,
},
filters: [{property: '_TypeHierarchy', operator: '=', value: 'PortfolioItem/Feature'},
{property: '__At', value: gvAt},
{property: 'Release', operator: '=', value: gvSelectedRelease.rallyRetrievedInfos.ObjectID}
],
listeners: {
load: loadedFeaturesHistorical,
scope: this
},
exceptionHandler: function (proxy, response, operation) {
console.log('Historical data loading exception - Z');
}
});
features.proxy.listeners = [
{
exception: function(proxy, options, response) {
console.log('Historical data loading exception - A');
}
},
{
loadexception: function(proxy, options, response) {
console.log('Historical data loading exception - B');
}
}
];
features.model.proxy.events.exception.listeners = [
{
exception: function(proxy, options, response) {
console.log('Historical data loading exception - C');
}
},
{
loadexception: function(proxy, options, response) {
console.log('Historical data loading exception - D');
}
}
];
features.listeners = [
{
exception: function(proxy, options, response) {
console.log('Historical data loading exception - E');
}
},
{
loadexception: function(proxy, options, response) {
console.log('Historical data loading exception - F');
}
}
];
features.on('exception',function(store, records, options){
console.log('Historical data loading exception - G');
},this);
features.load();
};
So, in case of loading exception, I would expect the console to display a message: "Historical data loading exception - X".
Here is the console output (stack trace) that appears when an exception occurs and is not caught by my code:
Thank for your suggestions!