[Flutter] Exceptions ์ด๋!?
ยท
๐ง flutter
Exceptions ์๋ฏธ: exceptions๋ ์์์น ๋ชปํ ์ผ์ด ๋ฐ์ํ์์ ๋ํ๋ด๋ ์ค๋ฅ์ด๋ค. ๊ธฐ๋ฅ: dart code๋ exceptions๋ฅผ throw ํ๊ณ catchํ ์ ์๋ค. ํน์ง: dart๋ exception๊ณผ error types๋ฅผ ์ ๊ณตํ์ง๋ง, null์ด ์๋ ๊ฐ์ฒด๋ง throw ํ ์ ์๋ค. exceptions๋ฅผ ๋ค๋ฃจ๊ธฐ ์ํด ์์์ผ ํ๋ ์ฉ์ด throw exception๋ฐ์ ์ ๊ฐ์ฒด ๋๋ ์ฝ๋ ๋ฑ์ ๋ฐํํ ์ ์๋ค. //์ผ๋จ ์๋ฌ๋ฅผ ๋์ ธ๋ณธ๋ค๊ณ ์๊ฐ throw ์ฌ์ฉ ์ฝ๋ ์) //example 1 throw FormatException('Expected at least 1 section'); //example 2 throw 'Out of llamas!'; example 1 ์ฌ์ฉ์ ๊ถ์ฅํ๋ค. ์..