Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
Python3 Automarker
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
David Paul
Python3 Automarker
Commits
ef36af9b
Commit
ef36af9b
authored
7 years ago
by
David Paul
Browse files
Options
Downloads
Patches
Plain Diff
Improve error catching to prevent silent errors
parent
4dc87546
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
grade.php
+4
-5
4 additions, 5 deletions
grade.php
with
4 additions
and
5 deletions
grade.php
+
4
−
5
View file @
ef36af9b
...
@@ -90,9 +90,8 @@ $postBody = str_replace(
...
@@ -90,9 +90,8 @@ $postBody = str_replace(
array
(
$sourcedid
,
$grade
,
$operation
,
uniqid
()),
array
(
$sourcedid
,
$grade
,
$operation
,
uniqid
()),
getPOXGradeRequest
());
getPOXGradeRequest
());
$response
=
sendOAuthBodyPOST
(
$method
,
$endpoint
,
$oauth_consumer_key
,
$oauth_consumer_secret
,
$content_type
,
$postBody
);
try
{
try
{
$response
=
sendOAuthBodyPOST
(
$method
,
$endpoint
,
$oauth_consumer_key
,
$oauth_consumer_secret
,
$content_type
,
$postBody
);
$retVal
=
parseResponse
(
$response
);
$retVal
=
parseResponse
(
$response
);
}
catch
(
Exception
$e
)
{
}
catch
(
Exception
$e
)
{
echo
json_encode
(
Array
(
"status"
=>
"failure"
,
"detail"
=>
$e
->
getMessage
(),
"response"
=>
$response
));
echo
json_encode
(
Array
(
"status"
=>
"failure"
,
"detail"
=>
$e
->
getMessage
(),
"response"
=>
$response
));
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment