Skip to content

Commit

Permalink
Refine slice limit error
Browse files Browse the repository at this point in the history
  • Loading branch information
2opremio committed Nov 12, 2021
1 parent ef85eca commit 7a45c67
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/xdrgen/generators/go.rb
Original file line number Diff line number Diff line change
Expand Up @@ -713,7 +713,7 @@ def render_decode_from_body(out, var, type, declared_variables:, self_encode:)
out.puts tail
if !type.decl.resolved_size.nil?
out.puts " if l > #{type.decl.resolved_size} {"
out.puts " return n, fmt.Errorf(\"data size (%d) exceeds max slice limit (#{type.decl.resolved_size})\", l)"
out.puts " return n, fmt.Errorf(\"data size (%d) exceeds size limit (#{type.decl.resolved_size}) of #{name type}\", l)"
out.puts " }"
end
out.puts " #{var} = nil"
Expand Down

0 comments on commit 7a45c67

Please sign in to comment.