summaryrefslogtreecommitdiff
path: root/re.go
diff options
context:
space:
mode:
Diffstat (limited to 're.go')
-rw-r--r--re.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/re.go b/re.go
index 341488c..9406b79 100644
--- a/re.go
+++ b/re.go
@@ -1,11 +1,17 @@
package main
import (
+ "log"
"regexp"
"strings"
)
func re(s, r string, global bool) string {
+ defer func() {
+ if r := recover(); r != nil {
+ log.Println("panic", r)
+ }
+ }()
// min: at least two separators
if len(s) < 2 {
return ""