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 Problem #141

Open
shema-ryan opened this issue Sep 27, 2022 · 0 comments
Open

Error Problem #141

shema-ryan opened this issue Sep 27, 2022 · 0 comments

Comments

@shema-ryan
Copy link

shema-ryan commented Sep 27, 2022

Am using workbench 8.0 but the packages seems not to capture any form of error ,
during the connectionSettings parameters i wrongly typed the db_name but it was still showing successfully connected ,
putting that beside , try{}catch doesn't catch any query error.

// here is sample of the my code
class Database {
late final MySqlConnection dbHandler;
static final configuration = ConnectionSettings(
db: 'windows_app',
user: 'root6',
password: 'hackermood',
port: 3306,
);

Future connectDb() async {
try {
dbHandler = await MySqlConnection.connect(configuration);
}
on MySqlClientError catch (error) {
print(error.toString());
} on SocketException catch(error){
print('we have captured this error');
}

catch (error) {

  print(error.toString());
}

}
}

in my init state i do call Database().connectdb but still can't receive any form of error.

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

No branches or pull requests

1 participant