jenkins-bot has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/356191 )
Change subject: Use console.error to display errors
......................................................................
Use console.error to display errors
In browsers that support error stack traces, console.error( e ) will
typically include the stack trace, so explicitly selecting e.stack is
not necessary.
Change-Id: Ieb25c3530d9a2db93ba34910c588d9049d1e6ffe
---
M wikibase/queryService/ui/App.js
M wikibase/queryService/ui/visualEditor/VisualEditor.js
2 files changed, 3 insertions(+), 5 deletions(-)
Approvals:
jenkins-bot: Verified
Thiemo Mättig (WMDE): Looks good to me, approved
diff --git a/wikibase/queryService/ui/App.js b/wikibase/queryService/ui/App.js
index 73c5e37..0e04421 100644
--- a/wikibase/queryService/ui/App.js
+++ b/wikibase/queryService/ui/App.js
@@ -318,9 +318,7 @@
$( '.visual-editor' ).delay( 500 ).fadeIn();
} catch ( e ) {
- if ( e.stack ) {
- window.console.log( e.stack );
- }
+ window.console.error( e );
}
};
@@ -817,7 +815,7 @@
self._actionBar.hide();
} catch ( e ) {
self._actionBar.show(
'wdqs-action-error-display', '', 'warning' );
- window.console.log( e.stack );
+ window.console.error( e );
}
self._handleQueryResultBrowsers();
diff --git a/wikibase/queryService/ui/visualEditor/VisualEditor.js
b/wikibase/queryService/ui/visualEditor/VisualEditor.js
index d60b71f..7141aec 100644
--- a/wikibase/queryService/ui/visualEditor/VisualEditor.js
+++ b/wikibase/queryService/ui/visualEditor/VisualEditor.js
@@ -167,7 +167,7 @@
try {
return $element.html(
this._getQueryTemplateHtml( template ) );
} catch ( e ) {
- window.console.log( e );
+ window.console.error( e );
}
}
--
To view, visit https://gerrit.wikimedia.org/r/356191
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ieb25c3530d9a2db93ba34910c588d9049d1e6ffe
Gerrit-PatchSet: 1
Gerrit-Project: wikidata/query/gui
Gerrit-Branch: master
Gerrit-Owner: Lucas Werkmeister (WMDE) <[email protected]>
Gerrit-Reviewer: Jonas Kress (WMDE) <[email protected]>
Gerrit-Reviewer: Thiemo Mättig (WMDE) <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits