code: func exceptionData(e error) *Exception {
  	var xerr *Exception
  	if c, ok := e.(causer); ok {
  		xerr = &Exception{Message: c.Cause().Error()}
  	} else {
  		xerr = &Exception{Message: e.Error()}
  	}
  	if s, ok := e.(stackTracer); ok {
  		st := s.StackTrace()
  		ln := len(st)
  		if ln > maxStackDepth {
  			ln = maxStackDepth
  		}
  		frames := make([]*StackEntry, ln)
  		for i := 0; i < ln; i++ {
  			f := st[i]
  			line, _ := strconv.Atoi(fmt.Sprintf("%d", f))
  			frames[i] = &StackEntry{
  				Path:  fmt.Sprintf("%s", f),
  				Line:  line,
  				Label: fmt.Sprintf("%n", f),
  			}
  		}
  		xerr.Stack = frames
  	}
  
  	return xerr
  }
docs: // exceptionData creates an Exception from an error.