File tree 2 files changed +27
-27
lines changed
2 files changed +27
-27
lines changed Original file line number Diff line number Diff line change @@ -201,33 +201,6 @@ bool CryptoErrorStore::Empty() const {
201
201
return errors_.empty ();
202
202
}
203
203
204
- template <typename ... Args>
205
- void CryptoErrorStore::Insert (const NodeCryptoError error, Args&&... args) {
206
- const char * error_string;
207
- switch (error) {
208
- case NodeCryptoError::CIPHER_JOB_FAILED:
209
- error_string = " Cipher job failed" ;
210
- break ;
211
- case NodeCryptoError::DERIVING_BITS_FAILED:
212
- error_string = " Deriving bits failed" ;
213
- break ;
214
- case NodeCryptoError::ENGINE_NOT_FOUND:
215
- error_string = " Engine \" %s\" was not found" ;
216
- break ;
217
- case NodeCryptoError::INVALID_KEY_TYPE:
218
- error_string = " Invalid key type" ;
219
- break ;
220
- case NodeCryptoError::KEY_GENERATION_JOB_FAILED:
221
- error_string = " Key generation failed" ;
222
- break ;
223
- case NodeCryptoError::NO_ERROR:
224
- error_string = " No error" ;
225
- break ;
226
- }
227
- errors.emplace_back (SPrintF (error_string,
228
- std::forward<Args>(args)...));
229
- }
230
-
231
204
MaybeLocal<Value> CryptoErrorStore::ToException (
232
205
Environment* env,
233
206
Local<String> exception_string) const {
Original file line number Diff line number Diff line change @@ -186,6 +186,33 @@ struct CryptoErrorStore {
186
186
std::vector<std::string> errors_;
187
187
};
188
188
189
+ template <typename ... Args>
190
+ void CryptoErrorStore::Insert (const NodeCryptoError error, Args&&... args) {
191
+ const char * error_string;
192
+ switch (error) {
193
+ case NodeCryptoError::CIPHER_JOB_FAILED:
194
+ error_string = " Cipher job failed" ;
195
+ break ;
196
+ case NodeCryptoError::DERIVING_BITS_FAILED:
197
+ error_string = " Deriving bits failed" ;
198
+ break ;
199
+ case NodeCryptoError::ENGINE_NOT_FOUND:
200
+ error_string = " Engine \" %s\" was not found" ;
201
+ break ;
202
+ case NodeCryptoError::INVALID_KEY_TYPE:
203
+ error_string = " Invalid key type" ;
204
+ break ;
205
+ case NodeCryptoError::KEY_GENERATION_JOB_FAILED:
206
+ error_string = " Key generation failed" ;
207
+ break ;
208
+ case NodeCryptoError::NO_ERROR:
209
+ error_string = " No error" ;
210
+ break ;
211
+ }
212
+ errors_.emplace_back (SPrintF (error_string,
213
+ std::forward<Args>(args)...));
214
+ }
215
+
189
216
template <typename T>
190
217
T* MallocOpenSSL (size_t count) {
191
218
void * mem = OPENSSL_malloc (MultiplyWithOverflowCheck (count, sizeof (T)));
You can’t perform that action at this time.
0 commit comments