Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exceptions not properly caught #460

Closed
schuettloeffel-elsa opened this issue Jan 25, 2024 · 2 comments · Fixed by #469
Closed

Exceptions not properly caught #460

schuettloeffel-elsa opened this issue Jan 25, 2024 · 2 comments · Fixed by #469
Assignees
Labels
Milestone

Comments

@schuettloeffel-elsa
Copy link
Contributor

On network connection issues, the php exceptions are not caught properly, so at the end a different message is presented to the user:

image

Instead, this message should be presented: https://github.com/elan-ev/studip-meeting/blob/master/lib/Helpers/MeetingsHelper.php#L176

Can be fixed by resolving namespace issue:

diff --git a/lib/Helpers/MeetingsHelper.php b/lib/Helpers/MeetingsHelper.php
index 31308e7..d1fa05d 100644
--- a/lib/Helpers/MeetingsHelper.php
+++ b/lib/Helpers/MeetingsHelper.php
@@ -192,7 +192,7 @@ class MeetingsHelper
             } else {
                 $error_message = I18N::_('Konnte dem Meeting nicht beitreten, Kommunikation mit dem Meeting-Server fehlgeschlagen.');
             }
-        } catch (Exception $e) {
+        } catch (\Exception $e) {
             $error_message = I18N::_('Konnte dem Meeting nicht beitreten, Kommunikation mit dem Meeting-Server fehlgeschlagen. ('. $e->getMessage() .')');
             throw new Error($error_message, ($e->getCode() ? $e->getCode() : 404));
         }
@@ -295,4 +295,4 @@ class MeetingsHelper
         }
     }

@ferishili ferishili added the bug label Apr 29, 2024
@ferishili ferishili self-assigned this Apr 29, 2024
@ferishili ferishili added this to the > 2.81 milestone Apr 29, 2024
ferishili added a commit to ferishili/studip-meeting that referenced this issue Apr 29, 2024
@ferishili
Copy link
Collaborator

Hi @schuettloeffel-elsa
That would be great if you could test the linked PR

Thanks in advance

@schuettloeffel-elsa
Copy link
Contributor Author

Yeah should work, we had this fix working for some time

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants