//------------------------------------------------------------------------------
// <copyright file="ArgumentException.java" company="Microsoft">
//      Copyright (c) Microsoft Corporation.  All rights reserved.
// </copyright>
// <summary>
//      Implement ArgumentException
// </summary>
//------------------------------------------------------------------------------


package com.microsoft.hpc.exceptions;

/**
 * The ArgumentException is a <code>RuntimeException</code> which indicates an invalid parameter was used
 *
 */
public class ArgumentException extends RuntimeException
{

    /**
     * 
     */
    private static final long serialVersionUID = -5236046512062955438L;

    /**
     * Constructs a new ArgumentException with a specified message and a parameter for the argument in question.
     * @param message   the detail message
     * @param argument  the argument which threw the exception
     */
    public ArgumentException(String message, Object argument)
    {
        super(message + ": " + argument);
    }
    
    /**
     * Constructs a new ArgumentException with a specified message 
     * @param message   the detail message
     */
    public ArgumentException(String message)
    {
        super(message);
    }
}
