parse-community / parse-php-sdk

The PHP SDK for Parse Platform
https://parseplatform.org/
Other
811 stars 346 forks source link

Adds specific error codes to certain ParseExceptions #334

Closed montymxb closed 7 years ago

montymxb commented 7 years ago

As mentioned in #180 some time ago, some of the exceptions thrown from this SDK should be setting errors codes as documented in the guide. Not all the exceptions can associate to codes that would make sense, so I have only modified those that are relevant.

If there are any other exceptions that anyone thinks could still use a relevant code go ahead and comment on it. Same for if there are any concerns with some of the exception/code pairings that I've made.

This PR makes no changes to the existing functionality and no new tests were added, just further details for exception handling.

codecov[bot] commented 7 years ago

Codecov Report

Merging #334 into master will increase coverage by <.01%. The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #334      +/-   ##
==========================================
+ Coverage   98.78%   98.79%   +<.01%     
==========================================
  Files          35       35              
  Lines        2727     2749      +22     
==========================================
+ Hits         2694     2716      +22     
  Misses         33       33
Impacted Files Coverage Δ
src/Parse/ParseObject.php 97.13% <100%> (ø) :arrow_up:
src/Parse/ParseACL.php 100% <100%> (ø) :arrow_up:
src/Parse/ParseRole.php 100% <100%> (ø) :arrow_up:
src/Parse/ParseClient.php 99.02% <100%> (ø) :arrow_up:
src/Parse/ParsePush.php 100% <100%> (ø) :arrow_up:
src/Parse/ParseQuery.php 99.25% <100%> (ø) :arrow_up:
src/Parse/ParseFile.php 100% <100%> (ø) :arrow_up:
src/Parse/ParseSchema.php 97.07% <100%> (ø) :arrow_up:
src/Parse/Internal/ParseRelationOperation.php 96.96% <100%> (+0.04%) :arrow_up:
src/Parse/ParseUser.php 98.25% <100%> (+0.14%) :arrow_up:

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 75f1199...6b60166. Read the comment docs.