improve error handling

This commit is contained in:
Sebastian Sdorra
2011-06-19 13:33:54 +02:00
parent 9d62147400
commit 45eeb2912b
2 changed files with 18 additions and 2 deletions

View File

@@ -501,3 +501,12 @@ if (Sonia.scm.Main){
});
}
if (Sonia.panel.SyntaxHighlighterPanel){
Ext.override(Sonia.panel.SyntaxHighlighterPanel, {
loadErrorTitleText: 'Fehler',
loadErrorMsgText: 'Die Datei konnte nicht geladen werden'
});
}

View File

@@ -137,6 +137,9 @@ Sonia.panel.SyntaxHighlighterPanel = Ext.extend(Ext.Panel, {
shPath: 'resources/syntaxhighlighter',
contentUrl: null,
loadErrorTitleText: 'Error',
loadErrorMsgText: 'Could not load file',
contentLoaded: false,
scriptsLoaded: false,
@@ -211,8 +214,12 @@ Sonia.panel.SyntaxHighlighterPanel = Ext.extend(Ext.Panel, {
this.contentLoaded = true;
this.highlight();
},
failure: function(){
// TODO
failure: function(result){
main.handleFailure(
result.status,
this.loadErrorTitleText,
this.loadErrorMsgText
);
}
});
},