ssa: binop check shl/shr
This commit is contained in:
15
internal/runtime/error.go
Normal file
15
internal/runtime/error.go
Normal file
@@ -0,0 +1,15 @@
|
||||
package runtime
|
||||
|
||||
type errorString string
|
||||
|
||||
func (e errorString) RuntimeError() {}
|
||||
|
||||
func (e errorString) Error() string {
|
||||
return "runtime error: " + string(e)
|
||||
}
|
||||
|
||||
func CheckRuntimeError(b bool, s string) {
|
||||
if b {
|
||||
panic(errorString(s).Error())
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user