File tree Expand file tree Collapse file tree
ydb/library/yql/udfs/common/roaring Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -201,7 +201,9 @@ namespace {
201201
202202 class TRoaringDeserialize : public TBoxedValue {
203203 public:
204- TRoaringDeserialize () {
204+ TRoaringDeserialize (TSourcePosition pos)
205+ : Pos_(pos)
206+ {
205207 }
206208
207209 static TStringRef Name () {
@@ -212,8 +214,13 @@ namespace {
212214 TUnboxedValue Run (const IValueBuilder* valueBuilder,
213215 const TUnboxedValuePod* args) const override {
214216 Y_UNUSED (valueBuilder);
215- return TUnboxedValuePod (new TRoaringWrapper (args[0 ].AsStringRef ()));
217+ try {
218+ return TUnboxedValuePod (new TRoaringWrapper (args[0 ].AsStringRef ()));
219+ } catch (const std::exception& e) {
220+ UdfTerminate ((TStringBuilder () << Pos_ << " " << e.what ()).data ());
221+ }
216222 }
223+ TSourcePosition Pos_;
217224 };
218225
219226 class TRoaringSerialize : public TBoxedValue {
@@ -303,7 +310,7 @@ namespace {
303310 builder.Returns <TResource<RoaringResourceName>>().Args ()->Add <TAutoMap<char *>>();
304311
305312 if (!typesOnly) {
306- builder.Implementation (new TRoaringDeserialize ());
313+ builder.Implementation (new TRoaringDeserialize (builder. GetSourcePosition () ));
307314 }
308315 } else if (TRoaringSerialize::Name () == name) {
309316 builder.Returns (builder.SimpleType <char *>())
You can’t perform that action at this time.
0 commit comments