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

Error Handling Not working #713

Open
iamved777 opened this issue Jul 16, 2023 · 0 comments
Open

Error Handling Not working #713

iamved777 opened this issue Jul 16, 2023 · 0 comments
Labels
needs investigation This will be tested / debugged or checked out.

Comments

@iamved777
Copy link

Hi!
I have checked various issues in issues section but not found proper method for handle errors.

try {
            
    $mailbox = new Mailbox($hoststring, '[email protected]', "adadadaadaadd", false);
    try {
        $mail_ids = $mailbox->searchMailbox('ALL');
    } catch (ConnectionException $ex) {
       $error = $ex->getMessage();
        echo $error;
    } catch (Exception $ex) {
        $error = $ex->getMessage();
        echo $error;
    }
                
 }catch (ConnectionException $ex) {
        $error = $ex->getMessage();
        echo $error;
        
    }catch (Exception $ex) {
        $error = $ex->getMessage();
        echo $error;
       
}

Its never echo error but instead giving fatal error on invalid password etc, Let me know if I am missing anything in this. Thanks!

@iamved777 iamved777 added the needs investigation This will be tested / debugged or checked out. label Jul 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs investigation This will be tested / debugged or checked out.
Projects
None yet
Development

No branches or pull requests

1 participant