Skip to content

Commit

Permalink
replace return by panic
Browse files Browse the repository at this point in the history
  • Loading branch information
kazai777 committed May 9, 2024
1 parent 3796c3c commit 4770d4b
Showing 1 changed file with 14 additions and 7 deletions.
21 changes: 14 additions & 7 deletions examples/gno.land/r/demo/profile/profile.gno
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,8 @@ func DisplayAvatarURL(address std.Address, username string) string {
}
}
}
return "Address or Username not found"

panic("address or username not found")
}

// Display age from address or username
Expand All @@ -173,7 +174,8 @@ func DisplayAge(address std.Address, username string) string {
}
}
}
return "Address or Username not found"

panic("address or username not found")
}

// Display gender from address or username
Expand All @@ -189,7 +191,8 @@ func DisplayGender(address std.Address, username string) string {
}
}
}
return "Address or Username not found"

panic("address or username not found")
}

// Display website from address or username
Expand All @@ -205,7 +208,8 @@ func DisplayWebsite(address std.Address, username string) string {
}
}
}
return "Address or Username not found"

panic("address or username not found")
}

// Display country from address or username
Expand All @@ -221,7 +225,8 @@ func DisplayCountry(address std.Address, username string) string {
}
}
}
return "Address or Username not found"

panic("address or username not found")
}

// Display city from address or username
Expand All @@ -237,7 +242,8 @@ func DisplayCity(address std.Address, username string) string {
}
}
}
return "Address or Username not found"

panic("address or username not found")
}

// Display modification history specific to a field from address or username
Expand Down Expand Up @@ -269,7 +275,8 @@ func DisplayModificationHistory(address std.Address, username, field string) str
}
}
}
return "Address or Username not found or no modifications recorded for the field"

panic("address or username not found or no modifications recorded for the field")
}

func Render(path string) string {
Expand Down

0 comments on commit 4770d4b

Please sign in to comment.