@@ -101,6 +101,7 @@ func main() {
101
101
rootCmd .PersistentFlags ().BoolP ("no-auto-timestamps" , "" , false , "Disable automatic timestamps for created_at/updated_at" )
102
102
rootCmd .PersistentFlags ().BoolP ("no-driver-templates" , "" , false , "Disable parsing of templates defined by the database driver" )
103
103
rootCmd .PersistentFlags ().BoolP ("no-back-referencing" , "" , false , "Disable back referencing in the loaded relationship structs" )
104
+ rootCmd .PersistentFlags ().BoolP ("always-wrap-errors" , "" , false , "Wrap all returned errors with stacktraces, also sql.ErrNoRows" )
104
105
rootCmd .PersistentFlags ().BoolP ("add-global-variants" , "" , false , "Enable generation for global variants" )
105
106
rootCmd .PersistentFlags ().BoolP ("add-panic-variants" , "" , false , "Enable generation for panic variants" )
106
107
rootCmd .PersistentFlags ().BoolP ("add-soft-deletes" , "" , false , "Enable soft deletion by updating deleted_at timestamp" )
@@ -180,6 +181,7 @@ func preRun(cmd *cobra.Command, args []string) error {
180
181
NoAutoTimestamps : viper .GetBool ("no-auto-timestamps" ),
181
182
NoDriverTemplates : viper .GetBool ("no-driver-templates" ),
182
183
NoBackReferencing : viper .GetBool ("no-back-referencing" ),
184
+ AlwaysWrapErrors : viper .GetBool ("always-wrap-errors" ),
183
185
Wipe : viper .GetBool ("wipe" ),
184
186
StructTagCasing : strings .ToLower (viper .GetString ("struct-tag-casing" )), // camel | snake | title
185
187
TagIgnore : viper .GetStringSlice ("tag-ignore" ),
0 commit comments