From b24713749b8549d5774fc38c95efa52b46271f71 Mon Sep 17 00:00:00 2001 From: Hajime Hoshi Date: Tue, 29 Jan 2019 11:11:54 +0900 Subject: [PATCH] mobile: Better panic messages --- mobile/touches_android.go | 2 +- mobile/touches_ios.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/mobile/touches_android.go b/mobile/touches_android.go index e1a13f88b..150472f94 100644 --- a/mobile/touches_android.go +++ b/mobile/touches_android.go @@ -26,5 +26,5 @@ func updateTouchesOnAndroid(action int, id int, x, y int) { } func updateTouchesOnIOSImpl(phase int, ptr int64, x, y int) { - panic("not reach") + panic("mobile: updateTouchesOnIOSImpl must not be called on Android") } diff --git a/mobile/touches_ios.go b/mobile/touches_ios.go index 7472f261f..3f0afaa3a 100644 --- a/mobile/touches_ios.go +++ b/mobile/touches_ios.go @@ -40,7 +40,7 @@ func getIDFromPtr(ptr int64) int { } func updateTouchesOnAndroid(action int, id int, x, y int) { - panic("not reach") + panic("mobile: updateTouchesOnAndroid must not be called on iOS") } func updateTouchesOnIOSImpl(phase int, ptr int64, x, y int) { @@ -55,6 +55,6 @@ func updateTouchesOnIOSImpl(phase int, ptr int64, x, y int) { delete(touches, id) updateTouches() default: - panic("not reach") + panic("not reached") } }