Skip to content

Commit f88c43b

Browse files
committed
добавлена еще проверка
1 parent 6140bc7 commit f88c43b

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

‎src/oscript/Web/Multipart/PostRequestData.cs‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ This Source Code Form is subject to the terms of the
1010
using System;
1111
using System.IO;
1212
using System.Text;
13+
using OneScript.Exceptions;
1314
using OneScript.Contexts;
1415
using OneScript.StandardLibrary.Binary;
1516
using OneScript.StandardLibrary.Collections;
@@ -93,6 +94,9 @@ public FixedMapImpl Files
9394
[ScriptConstructor(Name = "Из двоичных данных")]
9495
public static PostRequestData Constructor(BinaryDataContext data, IValue boundary)
9596
{
97+
if (data is null)
98+
throw RuntimeException.InvalidNthArgumentType(1);
99+
96100
return new PostRequestData(data.GetStream(), boundary?.ToString());
97101
}
98102

0 commit comments

Comments
 (0)