mirror of
https://github.com/scm-manager/scm-manager.git
synced 2026-05-06 14:37:30 +02:00
improve error handling
This commit is contained in:
@@ -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'
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
@@ -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
|
||||
);
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user