Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 65124200B46 for ; Fri, 1 Jul 2016 09:17:53 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 63C5A160A77; Fri, 1 Jul 2016 07:17:53 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 255D3160A84 for ; Fri, 1 Jul 2016 09:17:50 +0200 (CEST) Received: (qmail 37838 invoked by uid 500); 1 Jul 2016 07:17:50 -0000 Mailing-List: contact commits-help@ignite.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ignite.apache.org Delivered-To: mailing list commits@ignite.apache.org Received: (qmail 36456 invoked by uid 99); 1 Jul 2016 07:17:49 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 01 Jul 2016 07:17:49 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 51338ED315; Fri, 1 Jul 2016 07:17:49 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: anovikov@apache.org To: commits@ignite.apache.org Date: Fri, 01 Jul 2016 07:18:12 -0000 Message-Id: <7926874e79a94c46981dc927b6fe54ea@git.apache.org> In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [25/51] [abbrv] ignite git commit: IGNITE-3262 Refactored error names. archived-at: Fri, 01 Jul 2016 07:17:53 -0000 IGNITE-3262 Refactored error names. Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/020c96a6 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/020c96a6 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/020c96a6 Branch: refs/heads/ignite-3262 Commit: 020c96a665075f2e3ab424d987067d76f60623c0 Parents: 573b5a6 Author: Maxim Afanasiev Authored: Thu Jun 30 10:25:03 2016 +0700 Committer: Maxim Afanasiev Committed: Thu Jun 30 10:25:03 2016 +0700 ---------------------------------------------------------------------- .../src/main/js/serve/errors/AppError.js | 35 ------------------- .../main/js/serve/errors/AppErrorException.js | 36 ++++++++++++++++++++ .../js/serve/errors/DuplicateKeyException.js | 4 +-- .../src/main/js/serve/errors/ServerError.js | 31 ----------------- .../js/serve/errors/ServerErrorException.js | 36 ++++++++++++++++++++ .../src/main/js/serve/errors/index.js | 6 ++-- 6 files changed, 77 insertions(+), 71 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ignite/blob/020c96a6/modules/web-console/src/main/js/serve/errors/AppError.js ---------------------------------------------------------------------- diff --git a/modules/web-console/src/main/js/serve/errors/AppError.js b/modules/web-console/src/main/js/serve/errors/AppError.js deleted file mode 100644 index 74f5e9e..0000000 --- a/modules/web-console/src/main/js/serve/errors/AppError.js +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -'use strict'; - -class AppError extends Error { - constructor(message) { - super(message); - this.name = this.constructor.name; - this.code = 400; - this.httpCode = 400; - this.message = message; - if (typeof Error.captureStackTrace === 'function') { - Error.captureStackTrace(this, this.constructor); - } else { - this.stack = (new Error(message)).stack; - } - } -} - -module.exports = AppError; http://git-wip-us.apache.org/repos/asf/ignite/blob/020c96a6/modules/web-console/src/main/js/serve/errors/AppErrorException.js ---------------------------------------------------------------------- diff --git a/modules/web-console/src/main/js/serve/errors/AppErrorException.js b/modules/web-console/src/main/js/serve/errors/AppErrorException.js new file mode 100644 index 0000000..208b09b --- /dev/null +++ b/modules/web-console/src/main/js/serve/errors/AppErrorException.js @@ -0,0 +1,36 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +'use strict'; + +class AppErrorException extends Error { + constructor(message) { + super(message); + + this.name = this.constructor.name; + this.code = 400; + this.httpCode = 400; + this.message = message; + + if (typeof Error.captureStackTrace === 'function') + Error.captureStackTrace(this, this.constructor); + else + this.stack = (new Error(message)).stack; + } +} + +module.exports = AppErrorException; http://git-wip-us.apache.org/repos/asf/ignite/blob/020c96a6/modules/web-console/src/main/js/serve/errors/DuplicateKeyException.js ---------------------------------------------------------------------- diff --git a/modules/web-console/src/main/js/serve/errors/DuplicateKeyException.js b/modules/web-console/src/main/js/serve/errors/DuplicateKeyException.js index b88224f..80b0147 100644 --- a/modules/web-console/src/main/js/serve/errors/DuplicateKeyException.js +++ b/modules/web-console/src/main/js/serve/errors/DuplicateKeyException.js @@ -17,9 +17,9 @@ 'use strict'; -import AppError from './AppError'; +import AppErrorException from './AppError'; -class DuplicateKeyException extends AppError { +class DuplicateKeyException extends AppErrorException { constructor(message) { super(message); } http://git-wip-us.apache.org/repos/asf/ignite/blob/020c96a6/modules/web-console/src/main/js/serve/errors/ServerError.js ---------------------------------------------------------------------- diff --git a/modules/web-console/src/main/js/serve/errors/ServerError.js b/modules/web-console/src/main/js/serve/errors/ServerError.js deleted file mode 100644 index e685a41..0000000 --- a/modules/web-console/src/main/js/serve/errors/ServerError.js +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -'use strict'; - -class ServerError extends Error { - constructor(message) { - super(message); - this.name = this.constructor.name; - this.code = 500; - this.httpCode = 500; - this.message = message; - Error.captureStackTrace(this, this.constructor.name) - } -} - -module.exports = ServerError; http://git-wip-us.apache.org/repos/asf/ignite/blob/020c96a6/modules/web-console/src/main/js/serve/errors/ServerErrorException.js ---------------------------------------------------------------------- diff --git a/modules/web-console/src/main/js/serve/errors/ServerErrorException.js b/modules/web-console/src/main/js/serve/errors/ServerErrorException.js new file mode 100644 index 0000000..439755e --- /dev/null +++ b/modules/web-console/src/main/js/serve/errors/ServerErrorException.js @@ -0,0 +1,36 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +'use strict'; + +class ServerErrorException extends Error { + constructor(message) { + super(message); + + this.name = this.constructor.name; + this.code = 500; + this.httpCode = 500; + this.message = message; + + if (typeof Error.captureStackTrace === 'function') + Error.captureStackTrace(this, this.constructor); + else + this.stack = (new Error(message)).stack; + } +} + +module.exports = ServerErrorException; http://git-wip-us.apache.org/repos/asf/ignite/blob/020c96a6/modules/web-console/src/main/js/serve/errors/index.js ---------------------------------------------------------------------- diff --git a/modules/web-console/src/main/js/serve/errors/index.js b/modules/web-console/src/main/js/serve/errors/index.js index 5c692d5..9e3a1b0 100644 --- a/modules/web-console/src/main/js/serve/errors/index.js +++ b/modules/web-console/src/main/js/serve/errors/index.js @@ -22,8 +22,8 @@ module.exports = { implements: 'errors', factory: () => ({ - AppError: require('./AppError'), + AppErrorException: require('./AppErrorException'), DuplicateKeyException: require('./DuplicateKeyException'), - ServerError: require('./ServerError') + ServerErrorException: require('./ServerErrorException') }) -}; \ No newline at end of file +};