/// <summary>
/// A protected method checking the era number.
/// </summary>
/// <param name="era">The era number as reference. It is set
/// to <see cref="F:CurrentEra"/>, if the input value is 0.</param>
/// <exception name="T:System.ArgumentException">
/// The exception is thrown if the era is not supported by the class.
/// </exception>
internal void M_CheckEra(ref int era)
{
if (era == CurrentEra)
{
era = KoreanEra;
}
if (!M_EraHandler.ValidEra(era))
{
throw new ArgumentException("Era value was not valid.");
}
}