Skip to content

Instantly share code, notes, and snippets.

View njw9108's full-sized avatar
πŸ˜ƒ

JINWOO NAM njw9108

πŸ˜ƒ
View GitHub Profile
@njw9108
njw9108 / nagative_number_exception_sample.dart
Created May 15, 2023 13:53
μ‚¬μš©μž μ •μ˜ μ˜ˆμ™Έμ²˜λ¦¬μ˜ 예제
import 'dart:math' as math;
void main() {
try {
print(getSquareRoot(-10));
} catch (e) {
if (e is NegativeNumberException) {
print('μŒμˆ˜κ°€ λ“€μ–΄μ™”μŠ΅λ‹ˆλ‹€.${e.erroneousNumber}');
}
}
[
{
"id":1,
"name":"Cupcake",
"tagline":"A tag line",
"imageUrl":"https://source.unsplash.com/pGM4sjt_BdQ",
"price":299
},
{
"id":2,