gcanti / tcomb

Type checking and DDD for JavaScript
MIT License
1.89k stars 120 forks source link

Error stacktraces #336

Open maximelkin opened 5 years ago

maximelkin commented 5 years ago

Version

latest

Expected behaviour

Model validation errors do not blow stacktrace

Actual behaviour

nested structures generates long stacktrace and push out place of constructing of model

Steps to reproduce

  1. Create nested (~4-6 nested structs for example)
  2. Set wrong value
  3. Try to find in stacktrace actual place of error

Stack trace and console log

Hint: it would help a lot if you enable the debugger ("Pause on exceptions" in the "Source" panel of Chrome dev tools) and spot the place where the error is thrown