ELFIN exceptions

The following exception classes are defined by ELFIN, and can be thrown by ELFIN while it is responding to either TLicenseUse::Check or TLicenseUse::ExecuteOperations.

      //____________________________________________________________________
      // TElfinLicenseFailed
      // Concrete class for license denied errors.
      // Copyright (C) 1995 Taligent, Inc. All rights reserved.
      //____________________________________________________________________
      
      class TElfinLicenseFailed : public TLicenseException {
      public:
      
          enum EReason
          {
              kInvalidHostName,
              kLicenseFailed,
              kNoServer,
              kTooFewServers,
              kUnknownService,
              kMaximum = USHRT_MAX// Not thrown; allows new EReason's
          };
      
                  TElfinLicenseFailed(EReason whatHappened, const TText& message);
                  TElfinLicenseFailed(const TElfinLicenseFailed& copy);
          TElfinLicenseFailed& operator=(const TElfinLicenseFailed& copy);
          virtual ~TElfinLicenseFailed();
      
          virtual TStream&    operator>>=(TStream& toWhere) const;
          virtual TStream&    operator<<=(TStream& fromWhere);
          EReason     GetReason() const;
          virtual voidThrow()     const;
      protected:
      };

Member functions

GetReason returns the identifying information as to why the exception was thrown by ELFIN. The returned value indicates failures as follow:

      //____________________________________________________________________
      // TElfinLicenseUsageException
      // Concrete class for TElfinProvider* usage errors.
      // Copyright (C) 1995 Taligent, Inc. All rights reserved.
      //____________________________________________________________________
      
      class TElfinLicenseUsageException : public TLicenseException {
      public:
      
          enum EReason
          {
              kBothPortAndServiceAreNull,
              kFeatureTooLong,
              kHostTooLong,
              kNoConfigurationOperation,
              kSessionCopyConstructorCalled,
              kSessionDefaultConstructorCalled,
              kMaximum = USHRT_MAX// Not thrown; allows new EReason's
          };
      
                  TElfinLicenseUsageException(EReason whatHappened);
                  TElfinLicenseUsageException(const TElfinLicenseUsageException& copy);
          TElfinLicenseUsageException& operator=(const TElfinLicenseUsageException& copy);
          virtual ~TElfinLicenseUsageException();
      
          EReason         GetReason() const;
          virtual void    Throw()     const;
      
      protected:
      };

Member functions

GetReason returns the identifying information as to why the exception was thrown by ELFIN. The returned value indicates failures as follow:


[Contents] [Previous] [Next]
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.

Generated with WebMaker