From b44b1fd9a8a61c255c68cc3f1b958acc24520f21 Mon Sep 17 00:00:00 2001 From: tursom Date: Fri, 21 May 2021 17:35:02 +0800 Subject: [PATCH] update Exception --- exceptions/ElementNotFound.go | 4 ++-- exceptions/NPE.go | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/exceptions/ElementNotFound.go b/exceptions/ElementNotFound.go index 5ca9800..eb845cc 100644 --- a/exceptions/ElementNotFound.go +++ b/exceptions/ElementNotFound.go @@ -4,8 +4,8 @@ type ElementNotFoundException struct { RuntimeException } -func NewElementNotFoundException(message interface{}, getStackTrace bool) *ElementNotFoundException { - return &ElementNotFoundException{ +func NewElementNotFoundException(message interface{}, getStackTrace bool) ElementNotFoundException { + return ElementNotFoundException{ NewRuntimeException( message, "exception caused ElementNotFoundException:", diff --git a/exceptions/NPE.go b/exceptions/NPE.go index ac1ed35..c596bbf 100644 --- a/exceptions/NPE.go +++ b/exceptions/NPE.go @@ -4,8 +4,8 @@ type NPE struct { RuntimeException } -func NewNPE(message interface{}, getStackTrace bool) *NPE { - return &NPE{ +func NewNPE(message interface{}, getStackTrace bool) NPE { + return NPE{ NewRuntimeException( message, "exception caused NullPointerException:",