server icon indicating copy to clipboard operation
server copied to clipboard

Feature/error reporting

Open maoxuner opened this issue 2 years ago • 4 comments

  1. #38 Finally, I figured out that it's not necessarily rendering exception with error handler. Expected exceptions need to transform must extend RpcException. What I need is just error reporting.
  2. All exceptions will be caught by Exception, these is no need to catch HttpException or RuntimeException.
        } catch (HttpException | RuntimeException | Exception $exception) {

origin code

maoxuner avatar Jul 21 '22 08:07 maoxuner

Hi @pawmaster please, could you add some tests?

tabuna avatar Jul 25 '22 19:07 tabuna

@tabuna Sorry, I'm not formiliar with php unit test. Could you do the job for me?

maoxuner avatar Jul 26 '22 02:07 maoxuner

I've tried to throw \Exception('some message', 500) in FixtureProcedure::testAbort and then detect error message in ExpectedTest::exampleCalls but log file not exist. Logger function was called but log file not created.

maoxuner avatar Jul 26 '22 02:07 maoxuner

Codecov Report

Merging #39 (400e003) into master (f933dfd) will not change coverage. The diff coverage is 90.90%.

@@            Coverage Diff            @@
##             master      #39   +/-   ##
=========================================
  Coverage     99.77%   99.77%           
  Complexity      129      129           
=========================================
  Files            22       22           
  Lines           437      437           
=========================================
  Hits            436      436           
  Misses            1        1           
Impacted Files Coverage Δ
src/HandleProcedure.php 95.23% <90.90%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update f933dfd...400e003. Read the comment docs.

codecov[bot] avatar Jul 26 '22 13:07 codecov[bot]