diff --git a/packages/devextreme/js/core/errors.js b/packages/devextreme/js/core/errors.js index 2b01ea912b47..d7821886bfd1 100644 --- a/packages/devextreme/js/core/errors.js +++ b/packages/devextreme/js/core/errors.js @@ -253,7 +253,7 @@ export default errorUtils({ /** * @name ErrorsCore.W0019 */ - W0019: 'DevExtreme: Unable to Locate a Valid License Key\n\n' + + W0019: 'DevExtreme: Unable to Locate a Valid License Key.\n\n' + 'If you are using a 30-day trial version of DevExtreme, you must uninstall all copies of DevExtreme once your 30-day trial period expires. For terms and conditions that govern use of DevExtreme UI components/libraries, please refer to the DevExtreme End User License Agreement: https://js.devexpress.com/EULAs/DevExtremeComplete.\n\n' + 'To use DevExtreme in a commercial project, you must purchase a license. For pricing/licensing options, please visit: https://js.devexpress.com/Buy.\n\n' + 'If you have licensing-related questions or need help with a purchase, please email clientservices@devexpress.com.\n\n', diff --git a/packages/devextreme/js/core/utils/error.js b/packages/devextreme/js/core/utils/error.js index 95935e8bc57d..5c4747d83cdf 100644 --- a/packages/devextreme/js/core/utils/error.js +++ b/packages/devextreme/js/core/utils/error.js @@ -41,7 +41,8 @@ export default function(baseErrors, errors) { } function formatMessage(id, details) { - return format.apply(this, ['{0} - {1}. See:\n{2}', id, details, getErrorUrl(id)]); + const kind = id?.startsWith('W') ? 'warning' : 'error'; + return format.apply(this, ['{0} - {1}.\n\nFor additional information on this {2} message, see: {3}', id, details, kind, getErrorUrl(id)]); } function makeError(args) { diff --git a/packages/devextreme/testing/tests/DevExpress.core/utils.error.tests.js b/packages/devextreme/testing/tests/DevExpress.core/utils.error.tests.js index 27f9bd994bab..b366d38b88f5 100644 --- a/packages/devextreme/testing/tests/DevExpress.core/utils.error.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.core/utils.error.tests.js @@ -41,12 +41,12 @@ const mockVersion = function(s) { QUnit.test('\'log\' method logs error on console if ID is matched to error id pattern', function(assert) { errors.log('E1'); - assert.deepEqual(mockVersion(this.log[0].error), 'E1 - Error 1. See:\nhttp://js.devexpress.com/error/[VERSION]/E1'); + assert.deepEqual(mockVersion(this.log[0].error), 'E1 - Error 1.\n\nFor additional information on this error message, see: http://js.devexpress.com/error/[VERSION]/E1'); }); QUnit.test('\'log\' method logs warning on console if ID is matched to warning id pattern', function(assert) { errors.log('W1'); - assert.deepEqual(mockVersion(this.log[0].warn), 'W1 - Warning 1. See:\nhttp://js.devexpress.com/error/[VERSION]/W1'); + assert.deepEqual(mockVersion(this.log[0].warn), 'W1 - Warning 1.\n\nFor additional information on this warning message, see: http://js.devexpress.com/error/[VERSION]/W1'); }); QUnit.test('\'log\' method logs message on console if ID is not matched to any patterns', function(assert) { @@ -57,7 +57,7 @@ QUnit.test('\'log\' method logs message on console if ID is not matched to any p QUnit.test('\'Error\' method creates Error instance', function(assert) { const error = errors.Error('E1'); assert.ok(error instanceof Error); - assert.equal(mockVersion(error.message), 'E1 - Error 1. See:\nhttp://js.devexpress.com/error/[VERSION]/E1'); + assert.equal(mockVersion(error.message), 'E1 - Error 1.\n\nFor additional information on this error message, see: http://js.devexpress.com/error/[VERSION]/E1'); }); QUnit.test('\'Error\' method called with \'new\' returns Error instance', function(assert) { @@ -73,13 +73,13 @@ QUnit.test('\'Error\' method creates Error with \'__details\' and \'__id\' prope QUnit.test('\'Error\' method create Error with no unnecessary dots', function(assert) { const error = errors.Error('E2'); - assert.equal(mockVersion(error.message), 'E2 - Error 2. See:\nhttp://js.devexpress.com/error/[VERSION]/E2'); + assert.equal(mockVersion(error.message), 'E2 - Error 2.\n\nFor additional information on this error message, see: http://js.devexpress.com/error/[VERSION]/E2'); }); QUnit.test('\'log\' and \'error\' method support string formatting', function(assert) { errors.log('W2', 'Core'); - assert.deepEqual(mockVersion(this.log[0].warn), 'W2 - Core module is not initialized. See:\nhttp://js.devexpress.com/error/[VERSION]/W2'); + assert.deepEqual(mockVersion(this.log[0].warn), 'W2 - Core module is not initialized.\n\nFor additional information on this warning message, see: http://js.devexpress.com/error/[VERSION]/W2'); const error = errors.Error('W2', 'Core'); - assert.equal(mockVersion(error.message), 'W2 - Core module is not initialized. See:\nhttp://js.devexpress.com/error/[VERSION]/W2'); + assert.equal(mockVersion(error.message), 'W2 - Core module is not initialized.\n\nFor additional information on this warning message, see: http://js.devexpress.com/error/[VERSION]/W2'); }); diff --git a/packages/devextreme/testing/tests/DevExpress.data/odataStore.tests.js b/packages/devextreme/testing/tests/DevExpress.data/odataStore.tests.js index d9c927fc98b4..c865f3594ddc 100644 --- a/packages/devextreme/testing/tests/DevExpress.data/odataStore.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.data/odataStore.tests.js @@ -836,7 +836,7 @@ QUnit.test('Should show E4024 error when searching or filtering an Int32 field ( function assertFunc(message, operation) { assert.equal(message.replace(/\d+_\d+/, '[VERSION]'), - `E4024 - String function ${operation} cannot be used with the data field id of type Int32. See:\nhttp://js.devexpress.com/error/[VERSION]/E4024`); + `E4024 - String function ${operation} cannot be used with the data field id of type Int32.\n\nFor additional information on this error message, see: http://js.devexpress.com/error/[VERSION]/E4024`); } const promises = [ diff --git a/packages/devextreme/testing/tests/DevExpress.ui.widgets.form/formLayoutManager.markup.tests.js b/packages/devextreme/testing/tests/DevExpress.ui.widgets.form/formLayoutManager.markup.tests.js index ca5d4a87cac0..9f44eac20426 100644 --- a/packages/devextreme/testing/tests/DevExpress.ui.widgets.form/formLayoutManager.markup.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.ui.widgets.form/formLayoutManager.markup.tests.js @@ -2668,7 +2668,7 @@ QUnit.module('Supported editors', () => { const errorMessage = consoleErrorStub.getCall(0).args[0]; assert.equal(consoleErrorStub.callCount, 1, 'error was raised for item without dataField and editorType'); assert.equal(errorMessage.indexOf('E1035 - The editor cannot be created'), 0); - assert.ok(errorMessage.indexOf('See:\nhttp://js.devexpress.com/error/') > 0); + assert.ok(errorMessage.indexOf('\n\nFor additional information on this error message, see: http://js.devexpress.com/error/') > 0); consoleErrorStub.restore(); }); diff --git a/packages/devextreme/testing/tests/DevExpress.viz.core/baseWidget.tests.js b/packages/devextreme/testing/tests/DevExpress.viz.core/baseWidget.tests.js index 4dc2015f9658..7ea5bbbff6e3 100644 --- a/packages/devextreme/testing/tests/DevExpress.viz.core/baseWidget.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.viz.core/baseWidget.tests.js @@ -1137,7 +1137,7 @@ QUnit.test('in default output message with url in logger. without arguments', fu this.triggerIncident('E100'); assert.ok(this.error.calledOnce); - assert.equal(this.error.firstCall.args[0].replace(/\d+_\d+/, '0_1'), 'E100 - Templated text 1: {0}, Templated text 2: {1}. See:\nhttp://js.devexpress.com/error/0_1/E100'); + assert.equal(this.error.firstCall.args[0].replace(/\d+_\d+/, '0_1'), 'E100 - Templated text 1: {0}, Templated text 2: {1}.\n\nFor additional information on this error message, see: http://js.devexpress.com/error/0_1/E100'); }); QUnit.test('default incidentOccurred show warning', function(assert) { @@ -1146,7 +1146,7 @@ QUnit.test('default incidentOccurred show warning', function(assert) { this.triggerIncident('W100'); assert.ok(this.warn.calledOnce); - assert.equal(this.warn.firstCall.args[0].replace(/\d+_\d+/, '0_1'), 'W100 - Warning: Templated text 1: {0}, Templated text 2: {1}. See:\nhttp://js.devexpress.com/error/0_1/W100'); + assert.equal(this.warn.firstCall.args[0].replace(/\d+_\d+/, '0_1'), 'W100 - Warning: Templated text 1: {0}, Templated text 2: {1}.\n\nFor additional information on this warning message, see: http://js.devexpress.com/error/0_1/W100'); }); QUnit.test('in default output message with url in logger', function(assert) { @@ -1155,7 +1155,7 @@ QUnit.test('in default output message with url in logger', function(assert) { this.triggerIncident('E100', ['argument1', 'argument2']); assert.ok(this.error.calledOnce); - assert.equal(this.error.firstCall.args[0].replace(/\d+_\d+/, '0_1'), 'E100 - Templated text 1: argument1, Templated text 2: argument2. See:\nhttp://js.devexpress.com/error/0_1/E100'); + assert.equal(this.error.firstCall.args[0].replace(/\d+_\d+/, '0_1'), 'E100 - Templated text 1: argument1, Templated text 2: argument2.\n\nFor additional information on this error message, see: http://js.devexpress.com/error/0_1/E100'); }); QUnit.module('drawn', $.extend({}, environment, {