Draft: Print full stack for executed queries
This commit is contained in:
		
							parent
							
								
									ccdd740abf
								
							
						
					
					
						commit
						2e7a1e3abe
					
				
							
								
								
									
										10
									
								
								utils.go
									
									
									
									
									
								
							
							
						
						
									
										10
									
								
								utils.go
									
									
									
									
									
								
							| @ -6,7 +6,7 @@ import ( | ||||
| 	"fmt" | ||||
| 	"reflect" | ||||
| 	"regexp" | ||||
| 	"runtime" | ||||
| 	"runtime/debug" | ||||
| 	"strings" | ||||
| 	"sync" | ||||
| 	"time" | ||||
| @ -175,13 +175,7 @@ func toQueryValues(values [][]interface{}) (results []interface{}) { | ||||
| } | ||||
| 
 | ||||
| func fileWithLineNum() string { | ||||
| 	for i := 2; i < 15; i++ { | ||||
| 		_, file, line, ok := runtime.Caller(i) | ||||
| 		if ok && (!goSrcRegexp.MatchString(file) || goTestRegexp.MatchString(file)) { | ||||
| 			return fmt.Sprintf("%v:%v", file, line) | ||||
| 		} | ||||
| 	} | ||||
| 	return "" | ||||
| 	return fmt.Sprintf("Stack trace:\n%s", debug.Stack()) | ||||
| } | ||||
| 
 | ||||
| func isBlank(value reflect.Value) bool { | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Gerald Wagner
						Gerald Wagner