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

try catch 可以寫在一起 #47

Open
linroex opened this issue Feb 8, 2016 · 0 comments
Open

try catch 可以寫在一起 #47

linroex opened this issue Feb 8, 2016 · 0 comments
Assignees

Comments

@linroex
Copy link
Collaborator

linroex commented Feb 8, 2016

寫一起 or 分開要視情況,口頭解說

try {
    loadDataToTableFromCSV($db, "member", "member.csv");
} catch (Exception $e) {
    echo $e->getMessage();
}

try {
    loadDataToTableFromCSV($db, "mail", "mail.csv");
} catch (Exception $e) {
    echo $e->getMessage();
}

try {
    loadDataToTableFromCSV($db, "message", "message.csv");
} catch (Exception $e) {
    echo $e->getMessage();
}

try {
    loadDataToTableFromCSV($db, "response", "response.csv");
} catch (Exception $e) {
    echo $e->getMessage();
}
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

2 participants