@@ -13,16 +13,30 @@ pub trait ExportError: std::error::Error + Send + Sync + 'static {
1313#[ derive( Error , Debug ) ]
1414/// Errors that can occur during shutdown.
1515pub enum ShutdownError {
16- /// Shutdown already invoked.
16+ /// Shutdown has already been invoked.
17+ ///
18+ /// While shutdown is idempotent and calling it multiple times has no
19+ /// impact, this error suggests that another part of the application is
20+ /// invoking `shutdown` earlier than intended. Users should review their
21+ /// code to identify unintended or duplicate shutdown calls and ensure it is
22+ /// only triggered once at the correct place.
1723 #[ error( "Shutdown already invoked" ) ]
1824 AlreadyShutdown ,
1925
2026 /// Shutdown timed out before completing.
27+ ///
28+ /// This does not necessarily indicate a failure—shutdown may still be
29+ /// complete. If this occurs frequently, consider increasing the timeout
30+ /// duration to allow more time for completion.
2131 #[ error( "Shutdown timed out after {0:?}" ) ]
2232 Timeout ( Duration ) ,
2333
24- /// Shutdown failed with an error.
25- /// This error is returned when the shutdown process failed with an error.
34+ /// Shutdown failed due to an internal error.
35+ ///
36+ /// The error message is intended for logging purposes only and should not
37+ /// be used to make programmatic decisions. It is implementation-specific
38+ /// and subject to change without notice. Consumers of this error should not
39+ /// rely on its content beyond logging.
2640 #[ error( "Shutdown failed: {0}" ) ]
2741 InternalFailure ( String ) ,
2842}
0 commit comments