Merge pull request #724 from trheyi/main
Enhance runtime error stack trace output for better debugging
This commit is contained in:
commit
d372326af9
3 changed files with 9 additions and 0 deletions
1
go.mod
1
go.mod
|
|
@ -53,6 +53,7 @@ require (
|
|||
github.com/go-playground/universal-translator v0.18.1 // indirect
|
||||
github.com/go-playground/validator/v10 v10.22.0 // indirect
|
||||
github.com/go-redis/redis/v8 v8.11.5 // indirect
|
||||
github.com/go-sourcemap/sourcemap v2.1.4+incompatible // indirect
|
||||
github.com/go-sql-driver/mysql v1.7.1 // indirect
|
||||
github.com/goccy/go-json v0.10.3 // indirect
|
||||
github.com/golang/protobuf v1.5.3 // indirect
|
||||
|
|
|
|||
2
go.sum
2
go.sum
|
|
@ -60,6 +60,8 @@ github.com/go-playground/validator/v10 v10.22.0 h1:k6HsTZ0sTnROkhS//R0O+55JgM8C4
|
|||
github.com/go-playground/validator/v10 v10.22.0/go.mod h1:dbuPbCMFw/DrkbEynArYaCwl3amGuJotoKCe95atGMM=
|
||||
github.com/go-redis/redis/v8 v8.11.5 h1:AcZZR7igkdvfVmQTPnu9WE37LRrO/YrBH5zWyjDC0oI=
|
||||
github.com/go-redis/redis/v8 v8.11.5/go.mod h1:gREzHqY1hg6oD9ngVRbLStwAWKhA0FEgq8Jd4h5lpwo=
|
||||
github.com/go-sourcemap/sourcemap v2.1.4+incompatible h1:a+iTbH5auLKxaNwQFg0B+TCYl6lbukKPc7b5x0n1s6Q=
|
||||
github.com/go-sourcemap/sourcemap v2.1.4+incompatible/go.mod h1:F8jJfvm2KbVjc5NqelyYJmf/v5J0dwNLS2mL4sNA1Jg=
|
||||
github.com/go-sql-driver/mysql v1.6.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg=
|
||||
github.com/go-sql-driver/mysql v1.7.1 h1:lUIinVbN1DY0xBg0eMOzmmtGoHwWBbvnWubQUrtU8EI=
|
||||
github.com/go-sql-driver/mysql v1.7.1/go.mod h1:OXbVy3sEdcQ2Doequ6Z5BW6fXNQTmx+9S1MCJN5yJMI=
|
||||
|
|
|
|||
|
|
@ -12,6 +12,11 @@ import (
|
|||
// Start v8 runtime
|
||||
func Start(cfg config.Config) error {
|
||||
|
||||
debug := false
|
||||
if cfg.Mode == "development" {
|
||||
debug = true
|
||||
}
|
||||
|
||||
option := &v8.Option{
|
||||
MinSize: cfg.Runtime.MinSize,
|
||||
MaxSize: cfg.Runtime.MaxSize,
|
||||
|
|
@ -24,6 +29,7 @@ func Start(cfg config.Config) error {
|
|||
DefaultTimeout: cfg.Runtime.DefaultTimeout,
|
||||
ContextTimeout: cfg.Runtime.ContextTimeout,
|
||||
Import: cfg.Runtime.Import,
|
||||
Debug: debug,
|
||||
}
|
||||
|
||||
// Read the tsconfig.json
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue