Skip to content

refactor(compiler): replace panic with error returns in toColumn#4252

Open
Ray0907 wants to merge 1 commit intosqlc-dev:mainfrom
Ray0907:refactor/toColumn-return-error
Open

refactor(compiler): replace panic with error returns in toColumn#4252
Ray0907 wants to merge 1 commit intosqlc-dev:mainfrom
Ray0907:refactor/toColumn-return-error

Conversation

@Ray0907
Copy link

@Ray0907 Ray0907 commented Jan 4, 2026

Convert toColumn function from using panic() to returning errors,
improving error handling for invalid SQL type names. This allows
callers to handle errors gracefully instead of crashing.

Changes:

  • toColumn now returns (*Column, error) instead of *Column
  • Updated 3 call sites in resolve.go and output_columns.go

  Convert toColumn function from using panic() to returning errors,
  improving error handling for invalid SQL type names. This allows
  callers to handle errors gracefully instead of crashing.

  Changes:
  - toColumn now returns (*Column, error) instead of *Column
  - Updated 3 call sites in resolve.go and output_columns.go
@dosubot dosubot bot added size:S This PR changes 10-29 lines, ignoring generated files. 🔧 golang labels Jan 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:S This PR changes 10-29 lines, ignoring generated files. 🔧 golang

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant