# PodProviderNotInitializedException.withMessage constructor

PodProviderNotInitializedException.withMessage(

1. String msg

)

Create a new PodProviderNotInitializedException with the given message.

Exception thrown when attempting to use a PodProvider that hasn't been fully initialized.

Factory pods go through an initialization process before they can produce other pods. This exception occurs when code tries to access the factory pod's product before the factory itself is ready.

### Example:

    class MyPodProvider implements PodProvider<MyService> {
      bool _initialized = false;

      @override
      MyService getObject() {
        if (!_initialized) {
          throw PodProviderNotInitializedException();
        }
        return MyService();
      }
    }

    // Usage
    try {
      final service = factoryPod.getObject();
    } catch (e) {
      if (e is PodProviderNotInitializedException) {
        print('Factory pod not ready yet');
      }
    }

## Implementation

    PodProviderNotInitializedException.withMessage(String msg) : super(msg);