Page 1 of 1

[v3.0.2.0 - Concept] - All throw new exceptions

Posted: Tue Oct 03, 2017 4:05 am
by straightlight
No threw new exception should be used in Opencart to return errors but rather the defined function of error_handler or a log file.

Code: Select all

install1/cli_install.php
system/storage/vendor/scss.inc.php
admin/model/extension/payment/divido.php
catalog/model/extension/payment/alipay.php
catalog/model/extension/payment/divido.php
system/library/template/Twig/Lexer.php
system/library/mail/PHPMailer-master/src/PHPMailer.php
system/storage/vendor/leafo/scssphp/scss.inc.php
system/storage/vendor/divido/divido-php/lib/Divido.php
system/storage/vendor/react/promise/src/functions.php
system/storage/vendor/braintree/braintree_php/tests/integration/HttpClientApi.php
system/storage/vendor/cardinity/cardinity-sdk-php/src/Method/ResultObject.php
system/storage/vendor/cardinity/cardinity-sdk-php/src/Method/ResultObjectMapper.php
system/storage/vendor/cardinity/cardinity-sdk-php/src/Method/Validator.php
system/storage/vendor/cardinity/cardinity-sdk-php/src/Http/Guzzle/ClientAdapter.php
The team must define an alternate way to return the results other than the throw new exception errors.

Re: [v3.0.2.0 - Concept] - All throw new exceptions

Posted: Wed Oct 04, 2017 8:58 am
by straightlight
Found more results with:

Code: Select all

Throw new \Exception
Files:

Code: Select all

system/engine/loader.php
system/library/cache.php
system/library/db.php
system/library/mail.php
system/library/template.php
system/library/db/mpdo.php
system/library/db/mssql.php
system/library/db/mysql.php
system/library/db/mysqli.php
system/library/db/postgre.php
system/library/mail/smtp.php
system/library/template/template.php
system/storage/vendor/guzzlehttp/ringphp/tests/Client/Server.php
system/storage/vendor/guzzlehttp/ringphp/tests/Future/FutureValueTest.php
system/storage/vendor/react/promise/tests/PromiseTest/NotifyTestTrait.php
system/storage/vendor/react/promise/tests/PromiseTest/PromiseFulfilledTestTrait.php
system/storage/vendor/react/promise/tests/PromiseTest/PromiseRejectedTestTrait.php
system/storage/vendor/react/promise/tests/PromiseTest/RejectTestTrait.php
system/storage/vendor/react/promise/tests/PromiseTest/ResolveTestTrait.php

Code: Select all

$this->throwException(new \Exception
Files:

Code: Select all

system/storage/vendor/guzzlehttp/streams/tests/StreamDecoratorTraitTest.php
system/storage/vendor/react/promise/tests/CancellationQueueTest.php