GlueDev/laravel-stackdriver

Show the exception message

BadChoice opened this issue · 4 comments

Currently it only shows the exception but not the message, and this is something that can really help figure out what is happening,

Could it be possible to add?
I can try create a PR if you give me a couple of hints on where to add it

Thanks!

I am not sure I follow. What part of the exception exactly are you missing?

Route::get('/', function () {
    $error = 'Testing Stackdriver';
    $time = Carbon::now()->toDateTimeString();
    $message = join(' ', [$error, $time]);
    
    throw new Exception($message);
});

The code above shows up like this in my Cloud Console:
image

As you can see, the message is definitely visible for me. Furthermore, there's little influence I have over how Google shows the data it gets passed. As you can see on this line of code, the exception as a whole is passed on to Google.

Let me know if this is enough information for you.

So weird,
for example a NotFoundException, I can't see the URL that is not found

Captura de Pantalla 2019-09-13 a les 12 01 57

image

Apparently, Laravel throws a not found exception without a message attached to it. This is behaviour you could override in your app/Exceptions/Handler.php. However, that is outside of the scope of this package. As long as your exception has a message, the message should appear in your Cloud Console.

For now, I am closing this issue.

Ohh I see,
We used to use rollbar before migrating to goggle and we had kind of more info there, but as you say, this is not because of this package

Thank you so much for it, it works really well

Best!