Is there a way to grab errors for Google App Engine's getImageServingUrl?
up vote
0
down vote
favorite
This a php application running on Google App Engine. I'm using getImageServingUrl to get a url and store it for later use. I've actually implemented this in another part of the application, but in this case, when run, the php code stops right at the point where I make the call to get the url. The are no errors in the page or in the App Engine log. Is there another place to get errors? I'm not having luck tracking down the issue. Here's what I have:
// At the top of the page I call this
use googleappengineapicloud_storageCloudStorageTools;
// Some processing takes place to get the storage location of the image then
if (is_file($full_path_photo)) {
echo 'Getting URL...<br>';
$object_public_url = CloudStorageTools::getImageServingUrl($full_path_photo, ['secure_url' => true]);
echo 'Successful<br>';
};
// I've also tried it like this:
$object_public_url = CloudStorageTools::getImageServingUrl($full_path_photo);
// And adding this before the call:
CloudStorageTools::deleteImageServingUrl($full_path_photo);
When I run this, I get the "Getting URL...", then nothing. The page just stops executing.
php google-app-engine
add a comment |
up vote
0
down vote
favorite
This a php application running on Google App Engine. I'm using getImageServingUrl to get a url and store it for later use. I've actually implemented this in another part of the application, but in this case, when run, the php code stops right at the point where I make the call to get the url. The are no errors in the page or in the App Engine log. Is there another place to get errors? I'm not having luck tracking down the issue. Here's what I have:
// At the top of the page I call this
use googleappengineapicloud_storageCloudStorageTools;
// Some processing takes place to get the storage location of the image then
if (is_file($full_path_photo)) {
echo 'Getting URL...<br>';
$object_public_url = CloudStorageTools::getImageServingUrl($full_path_photo, ['secure_url' => true]);
echo 'Successful<br>';
};
// I've also tried it like this:
$object_public_url = CloudStorageTools::getImageServingUrl($full_path_photo);
// And adding this before the call:
CloudStorageTools::deleteImageServingUrl($full_path_photo);
When I run this, I get the "Getting URL...", then nothing. The page just stops executing.
php google-app-engine
You should try-catch your code to see if any exception is throwed. Following the doc, it may throw a InvalidArgumentException or a googleappengineapicloud_storageCloudStorageException
– Tom Ah
Nov 11 at 22:46
I was thinking that somewhere in the last four hours I had tried that, but doing it this time did produce a result - "Unspecified error with image". The error is kind of a let down, but better than nothing.
– fitz
Nov 11 at 23:26
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
This a php application running on Google App Engine. I'm using getImageServingUrl to get a url and store it for later use. I've actually implemented this in another part of the application, but in this case, when run, the php code stops right at the point where I make the call to get the url. The are no errors in the page or in the App Engine log. Is there another place to get errors? I'm not having luck tracking down the issue. Here's what I have:
// At the top of the page I call this
use googleappengineapicloud_storageCloudStorageTools;
// Some processing takes place to get the storage location of the image then
if (is_file($full_path_photo)) {
echo 'Getting URL...<br>';
$object_public_url = CloudStorageTools::getImageServingUrl($full_path_photo, ['secure_url' => true]);
echo 'Successful<br>';
};
// I've also tried it like this:
$object_public_url = CloudStorageTools::getImageServingUrl($full_path_photo);
// And adding this before the call:
CloudStorageTools::deleteImageServingUrl($full_path_photo);
When I run this, I get the "Getting URL...", then nothing. The page just stops executing.
php google-app-engine
This a php application running on Google App Engine. I'm using getImageServingUrl to get a url and store it for later use. I've actually implemented this in another part of the application, but in this case, when run, the php code stops right at the point where I make the call to get the url. The are no errors in the page or in the App Engine log. Is there another place to get errors? I'm not having luck tracking down the issue. Here's what I have:
// At the top of the page I call this
use googleappengineapicloud_storageCloudStorageTools;
// Some processing takes place to get the storage location of the image then
if (is_file($full_path_photo)) {
echo 'Getting URL...<br>';
$object_public_url = CloudStorageTools::getImageServingUrl($full_path_photo, ['secure_url' => true]);
echo 'Successful<br>';
};
// I've also tried it like this:
$object_public_url = CloudStorageTools::getImageServingUrl($full_path_photo);
// And adding this before the call:
CloudStorageTools::deleteImageServingUrl($full_path_photo);
When I run this, I get the "Getting URL...", then nothing. The page just stops executing.
php google-app-engine
php google-app-engine
asked Nov 11 at 22:39
fitz
123
123
You should try-catch your code to see if any exception is throwed. Following the doc, it may throw a InvalidArgumentException or a googleappengineapicloud_storageCloudStorageException
– Tom Ah
Nov 11 at 22:46
I was thinking that somewhere in the last four hours I had tried that, but doing it this time did produce a result - "Unspecified error with image". The error is kind of a let down, but better than nothing.
– fitz
Nov 11 at 23:26
add a comment |
You should try-catch your code to see if any exception is throwed. Following the doc, it may throw a InvalidArgumentException or a googleappengineapicloud_storageCloudStorageException
– Tom Ah
Nov 11 at 22:46
I was thinking that somewhere in the last four hours I had tried that, but doing it this time did produce a result - "Unspecified error with image". The error is kind of a let down, but better than nothing.
– fitz
Nov 11 at 23:26
You should try-catch your code to see if any exception is throwed. Following the doc, it may throw a InvalidArgumentException or a googleappengineapicloud_storageCloudStorageException
– Tom Ah
Nov 11 at 22:46
You should try-catch your code to see if any exception is throwed. Following the doc, it may throw a InvalidArgumentException or a googleappengineapicloud_storageCloudStorageException
– Tom Ah
Nov 11 at 22:46
I was thinking that somewhere in the last four hours I had tried that, but doing it this time did produce a result - "Unspecified error with image". The error is kind of a let down, but better than nothing.
– fitz
Nov 11 at 23:26
I was thinking that somewhere in the last four hours I had tried that, but doing it this time did produce a result - "Unspecified error with image". The error is kind of a let down, but better than nothing.
– fitz
Nov 11 at 23:26
add a comment |
1 Answer
1
active
oldest
votes
up vote
0
down vote
Try/Catch was able to get an error message for this one. In my case it was kind of a generic error. For the overall issue I think has something to do with my buckets. I tried the whole thing with a different bucket and it seems to work. Here is the example -
// At the top of the page I call this
use googleappengineapicloud_storageCloudStorageTools;
// Some processing takes place to get the storage location of the image in GCP storage then
if (is_file($full_path_photo)) {
try {
$object_public_url = CloudStorageTools::getImageServingUrl($full_path_photo, ['secure_url' => true]);
throw new Exception();
} catch (Exception $e) {
echo 'Error: '.$e->getMessage().'<br>';
};
Thanks for the help Tom.
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
Try/Catch was able to get an error message for this one. In my case it was kind of a generic error. For the overall issue I think has something to do with my buckets. I tried the whole thing with a different bucket and it seems to work. Here is the example -
// At the top of the page I call this
use googleappengineapicloud_storageCloudStorageTools;
// Some processing takes place to get the storage location of the image in GCP storage then
if (is_file($full_path_photo)) {
try {
$object_public_url = CloudStorageTools::getImageServingUrl($full_path_photo, ['secure_url' => true]);
throw new Exception();
} catch (Exception $e) {
echo 'Error: '.$e->getMessage().'<br>';
};
Thanks for the help Tom.
add a comment |
up vote
0
down vote
Try/Catch was able to get an error message for this one. In my case it was kind of a generic error. For the overall issue I think has something to do with my buckets. I tried the whole thing with a different bucket and it seems to work. Here is the example -
// At the top of the page I call this
use googleappengineapicloud_storageCloudStorageTools;
// Some processing takes place to get the storage location of the image in GCP storage then
if (is_file($full_path_photo)) {
try {
$object_public_url = CloudStorageTools::getImageServingUrl($full_path_photo, ['secure_url' => true]);
throw new Exception();
} catch (Exception $e) {
echo 'Error: '.$e->getMessage().'<br>';
};
Thanks for the help Tom.
add a comment |
up vote
0
down vote
up vote
0
down vote
Try/Catch was able to get an error message for this one. In my case it was kind of a generic error. For the overall issue I think has something to do with my buckets. I tried the whole thing with a different bucket and it seems to work. Here is the example -
// At the top of the page I call this
use googleappengineapicloud_storageCloudStorageTools;
// Some processing takes place to get the storage location of the image in GCP storage then
if (is_file($full_path_photo)) {
try {
$object_public_url = CloudStorageTools::getImageServingUrl($full_path_photo, ['secure_url' => true]);
throw new Exception();
} catch (Exception $e) {
echo 'Error: '.$e->getMessage().'<br>';
};
Thanks for the help Tom.
Try/Catch was able to get an error message for this one. In my case it was kind of a generic error. For the overall issue I think has something to do with my buckets. I tried the whole thing with a different bucket and it seems to work. Here is the example -
// At the top of the page I call this
use googleappengineapicloud_storageCloudStorageTools;
// Some processing takes place to get the storage location of the image in GCP storage then
if (is_file($full_path_photo)) {
try {
$object_public_url = CloudStorageTools::getImageServingUrl($full_path_photo, ['secure_url' => true]);
throw new Exception();
} catch (Exception $e) {
echo 'Error: '.$e->getMessage().'<br>';
};
Thanks for the help Tom.
answered Nov 12 at 0:25
fitz
123
123
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53253962%2fis-there-a-way-to-grab-errors-for-google-app-engines-getimageservingurl%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
You should try-catch your code to see if any exception is throwed. Following the doc, it may throw a InvalidArgumentException or a googleappengineapicloud_storageCloudStorageException
– Tom Ah
Nov 11 at 22:46
I was thinking that somewhere in the last four hours I had tried that, but doing it this time did produce a result - "Unspecified error with image". The error is kind of a let down, but better than nothing.
– fitz
Nov 11 at 23:26