-
-
Save todorok1/16232fa0ba1d258a5e8acadc12946f1d to your computer and use it in GitHub Desktop.
例外を握り潰すパターン
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
try | |
{ | |
string num = "one"; | |
int stringNumber = int.Parse(num); | |
Debug.Log($"変換された値は{stringNumber}でした。"); | |
} | |
catch (Exception e) | |
{ | |
// 何もしないで抜けちゃうよー | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment