# Class PublishException

java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.gradle.api.GradleException
org.gradle.api.artifacts.PublishException

All Implemented Interfaces:
  `Serializable`

public class PublishException extends GradleException

A `PublishException` is thrown when a dependency configuration cannot be published for some reason.

Since:
  1.0
See Also:
  - Serialized Form

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `PublishException(String message)`
  Creates a new `PublishException`.
  `PublishException(String message, Throwable cause)`
  Creates a new `PublishException`.

- ## Method Summary

  ### Methods inherited from class Throwable

  `addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString`

  ### Methods inherited from class Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- ## Constructor Details

  - ### PublishException

    public PublishException(String message, Throwable cause)
    Creates a new `PublishException`.
    Since:
      1.0

  - ### PublishException

    public PublishException(String message)
    Creates a new `PublishException`.
    Since:
      2.0