From 7a72835d3ba1731af180704ed9774c01885a4095 Mon Sep 17 00:00:00 2001 From: rushabh-v Date: Fri, 8 Jan 2021 20:43:16 +0530 Subject: [PATCH] throw error if string_length > maxlen in pad_sequences --- src/sentiment.jl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/sentiment.jl b/src/sentiment.jl index 4bcffd6..c64d1e8 100644 --- a/src/sentiment.jl +++ b/src/sentiment.jl @@ -8,6 +8,8 @@ function pad_sequences(l, maxlen=500) push!(res, ele) end return res + else + throw("String length exceeds maximum length.") end end