@@ -186,50 +186,72 @@ pub struct ActivityDefinition {
186
186
pub amount_msat : Amount ,
187
187
}
188
188
189
+ /// Represents errors that can occur during simulation execution.
189
190
#[ derive( Debug , Error ) ]
190
191
pub enum SimulationError {
192
+ /// Error that occurred during Lightning Network operations
191
193
#[ error( "Lightning Error: {0:?}" ) ]
192
194
LightningError ( #[ from] LightningError ) ,
195
+ /// Error that occurred during task execution
193
196
#[ error( "TaskError" ) ]
194
197
TaskError ,
198
+ /// Error that occurred while writing CSV data
195
199
#[ error( "CSV Error: {0:?}" ) ]
196
200
CsvError ( #[ from] csv:: Error ) ,
201
+ /// Error that occurred during file operations
197
202
#[ error( "File Error" ) ]
198
203
FileError ,
204
+ /// Error that occurred during random activity generation
199
205
#[ error( "{0}" ) ]
200
206
RandomActivityError ( RandomActivityError ) ,
207
+ /// Error that occurred in the simulated network
201
208
#[ error( "Simulated Network Error: {0}" ) ]
202
209
SimulatedNetworkError ( String ) ,
210
+ /// Error that occurred while accessing system time
203
211
#[ error( "System Time Error: {0}" ) ]
204
212
SystemTimeError ( #[ from] SystemTimeError ) ,
213
+ /// Error that occurred when a required node was not found
205
214
#[ error( "Missing Node Error: {0}" ) ]
206
215
MissingNodeError ( String ) ,
216
+ /// Error that occurred in message passing channels
207
217
#[ error( "Mpsc Channel Error: {0}" ) ]
208
218
MpscChannelError ( String ) ,
219
+ /// Error that occurred while generating payment parameters
209
220
#[ error( "Payment Generation Error: {0}" ) ]
210
221
PaymentGenerationError ( PaymentGenerationError ) ,
222
+ /// Error that occurred while generating destination nodes
211
223
#[ error( "Destination Generation Error: {0}" ) ]
212
224
DestinationGenerationError ( DestinationGenerationError ) ,
213
225
}
214
226
227
+ /// Represents errors that can occur during Lightning Network operations.
215
228
#[ derive( Debug , Error ) ]
216
229
pub enum LightningError {
230
+ /// Error that occurred while connecting to a Lightning node
217
231
#[ error( "Node connection error: {0}" ) ]
218
232
ConnectionError ( String ) ,
233
+ /// Error that occurred while retrieving node information
219
234
#[ error( "Get info error: {0}" ) ]
220
235
GetInfoError ( String ) ,
236
+ /// Error that occurred while sending a payment
221
237
#[ error( "Send payment error: {0}" ) ]
222
238
SendPaymentError ( String ) ,
239
+ /// Error that occurred while tracking a payment
223
240
#[ error( "Track payment error: {0}" ) ]
224
241
TrackPaymentError ( String ) ,
242
+ /// Error that occurred when a payment hash is invalid
225
243
#[ error( "Invalid payment hash" ) ]
226
244
InvalidPaymentHash ,
245
+ /// Error that occurred while retrieving information about a specific node
227
246
#[ error( "Get node info error: {0}" ) ]
228
247
GetNodeInfoError ( String ) ,
248
+ /// Error that occurred during configuration validation
229
249
#[ error( "Config validation failed: {0}" ) ]
230
250
ValidationError ( String ) ,
251
+ /// Error that represents a permanent failure condition
231
252
#[ error( "Permanent error: {0:?}" ) ]
232
253
PermanentError ( String ) ,
254
+ /// Error that occurred while listing channels
233
255
#[ error( "List channels error: {0}" ) ]
234
256
ListChannelsError ( String ) ,
235
257
}
@@ -286,6 +308,7 @@ pub trait LightningNode: Send {
286
308
async fn list_channels ( & mut self ) -> Result < Vec < u64 > , LightningError > ;
287
309
}
288
310
311
+ /// Represents an error that occurs when generating a destination for a payment.
289
312
#[ derive( Debug , Error ) ]
290
313
#[ error( "Destination generation error: {0}" ) ]
291
314
pub struct DestinationGenerationError ( String ) ;
0 commit comments