Данный отчёт сгенерирован 04.04.2023 06:21:13 UTC.
HTML версия (этот сайт) сгенерирован 04.04.2023 06:21:31 UTC.
Коммит: [bfeb65b9] add automatic zip creation 04.04.2023 06:21:13
HTML версия (этот сайт) сгенерирован 04.04.2023 06:21:31 UTC.
Коммит: [bfeb65b9] add automatic zip creation 04.04.2023 06:21:13
Задача: Трансляція Виключень
04.04.2023 06:21:13
Описание: Є статичний метод void M(), виклик якого може викидати винятки IndexOutOfRangeException та ArgumentException.
Оголосити статичний метод void T(), який викликає метод М(), ловить викинуті ним винятки, обертає їх у CustomException і викидає знову. Оголосити також тип CustomException.
04.04.2023 06:21:13
Решений: 28
04.04.2023 06:21:13
Трансляція Виключень
04.04.2023 06:21:13
class CustomException : Exception {}
static void T() {
try
{
M();
}
catch(Exception e)
{
throw new CustomException();
}
}
class CustomException : Exception
{
public CustomException(Exception innerException)
: base("", innerException)
{ }
}
static void T() {
try
{
M();
}
catch(IndexOutOfRangeException e)
{
throw new CustomException(e);
}
catch(ArgumentException e)
{
throw new CustomException(e);
}
}
class CustomException : Exception {}
static void T()
{
try
{
M();
}
catch (ArgumentException e)
{
throw new CustomException();
}
catch (CustomException e)
{
throw new CustomException();
}
}
static void T()
{
try
{
M();
}
catch (IndexOutOfRangeException e)
{
throw new CustomException(e);
}
catch (ArgumentException e)
{
throw new CustomException(e);
}
}
class CustomException : Exception
{
public CustomException(Exception innerException)
: base("", innerException)
{ }
}
class CustomException : Exception
{
public CustomException(IndexOutOfRangeException ex){}
public CustomException(ArgumentException ex) {}
}
static void T()
{
try
{
M();
}
catch(IndexOutOfRangeException ex)
{
throw new CustomException(ex);
}
catch(ArgumentException ex)
{
throw new CustomException(ex);
}
}
internal class CustomException : Exception {
public Exception E { get; }
public CustomException(Exception e) : base() {
E = e;
}
}
static void T() {
try {
M();
} catch (Exception e) {
throw new CustomException(e);
}
}
class CustomException : Exception
{
public CustomException()
{
}
public CustomException(string message) : base(message)
{
}
}
static void T()
{
try
{
M();
}
catch (Exception exc)
{
throw new CustomException(exc.Message);
}
}
static void T()
{
try
{
M();
}
catch (Exception ex)
{
throw new CustomException(ex.Message, ex);
}
}
[Serializable]
public class CustomException : Exception
{
public CustomException() { }
public CustomException(string message) : base(message) { }
public CustomException(string message, Exception inner) : base(message, inner) { }
protected CustomException(
System.Runtime.Serialization.SerializationInfo info,
System.Runtime.Serialization.StreamingContext context) : base(info, context) { }
}
class CustomException: Exception
{
public CustomException() { }
public CustomException(string message)
: base(message) { }
public CustomException(string message, Exception inner)
: base(message, inner) { }
public CustomException(Exception inner)
: this("", inner) { }
}
static void T() {
try {
M();
}
catch (Exception ex) {
if (ex is IndexOutOfRangeException || ex is ArgumentException) {
throw new CustomException(ex);
}
}
}
class CustomException:Exception {public CustomException():base(){}}
static void T() {
M();
try
{
}
catch(Exception ex)
{
throw (CustomException)ex;
}
}
class CustomException : Exception {}
static void T() {
try
{
M();
}
catch(Exception e)
{
throw new CustomException();
}
}
static void T()
{
try
{
M();
}
catch (IndexOutOfRangeException ex)
{
throw new CustomException(ex);
}
catch (ArgumentException ex)
{
throw new CustomException(ex);
}
}
class CustomException : Exception{
public CustomException(Exception innerEx):base("", innerEx) { }
}
class CustomException : Exception
{
IndexOutOfRangeException index;
ArgumentException argument;
public CustomException(IndexOutOfRangeException i)
: base() {
index = i;
}
public CustomException(ArgumentException a)
: base()
{
argument = a;
}
}
static void T()
{
try
{
M();
}
catch (IndexOutOfRangeException exI)
{
throw new CustomException(exI);
}
catch (ArgumentException exA)
{
throw new CustomException(exA);
}
}
class CustomException:Exception {}
static void T() {
try
{
M();
}
catch(Exception ex)
{
CustomException custEx = (CustomException)ex;
throw custEx;
}
}
class CustomException : Exception
{
public CustomException(Exception innerException)
: base("", innerException)
{
}
}
static void T()
{
try
{
M();
}
catch (IndexOutOfRangeException e)
{
throw new CustomException(e);
}
catch (ArgumentException e)
{
throw new CustomException(e);
}
}
class CustomException: Exception
{
public CustomException(Exception innerException) : base("", innerException) { }
}
static void T()
{
try
{
M();
}
catch (IndexOutOfRangeException ex)
{
throw new CustomException(ex);
}
catch (ArgumentException ex)
{
throw new CustomException(ex);
}
}
class CustomException: Exception
{
public CustomException (Exception innerException)
: base("", innerException)
{}
}
static void T() {
try
{
M();
}
catch(IndexOutOfRangeException e)
{
throw new CustomException(e);
}
catch(ArgumentException e)
{
throw new CustomException(e);
}
}
class CustomException {}
static void T() {
M();
}
class CustomException : Exception {}
public static void T()
{
try
{
M();
}
catch (CustomException)
{
throw new CustomException();
}
}
[Serializable]
public class CustomException : Exception
{
public CustomException() { }
public CustomException(string message) : base(message) { }
public CustomException(string message, Exception inner) : base(message, inner) { }
protected CustomException(
System.Runtime.Serialization.SerializationInfo info,
System.Runtime.Serialization.StreamingContext context) : base(info, context) { }
}
static void T() {
try {
M();
}
catch(IndexOutOfRangeException ex){
throw new CustomException("Index out of range", ex);
}
catch(ArgumentException ex){
throw new CustomException("Argument exception", ex);
}
}
class CustomException : Exception
{
public CustomException(Exception innerException)
: base("", innerException)
{}
}
static void T() {
try
{
M();
}
catch(IndexOutOfRangeException e)
{
throw new CustomException(e);
}
catch(ArgumentException e)
{
throw new CustomException(e);
}
}
class CustomException : Exception
{
public CustomException(Exception innerException)
: base("", innerException)
{
}
}
static void T()
{
try
{
M();
} catch (ArgumentException ae)
{
throw new CustomException(ae);
} catch (IndexOutOfRangeException ei)
{
throw new CustomException(ei);
}
}
class CustomException : Exception
{
public CustomException(Exception innerException) : base("", innerException) { }
}
static void T()
{
try
{
M();
}
catch(Exception e)
{
throw new CustomException(e);
}
}
public class CustomException : Exception
{
public CustomException()
{
}
public CustomException(string message)
: base(message)
{
}
public CustomException(string message, Exception inner)
: base(message, inner)
{
}
}
static void T()
{
try
{
M();
}
catch (Exception e)
when (e is CustomException || e is ArgumentException)
{
new CustomException(e.Message, e);
}
}
static void T() {
try
{
M();
}
catch (System.Exception)
{
throw new CustomException();
}
}
class CustomException : Exception
{
public CustomException() : base("Custom exception!")
{
}
}
static void T()
{
try
{
M();
}
catch (IndexOutOfRangeException e)
{
throw new CustomException(e);
}
catch (ArgumentException e)
{
throw new CustomException(e);
}
}
class CustomException : Exception
{
public CustomException(Exception innerException)
: base("", innerException)
{ }
}
class CustomException : Exception
{
public CustomException(Exception innerException)
:base("", innerException)
{}
}
static void T()
{
try
{
M();
}
catch (IndexOutOfRangeException ex)
{
throw new CustomException(ex);
}
catch (ArgumentException ex)
{
throw new CustomException(ex);
}
}
class CustomException : SystemException
{
public CustomException(Exception e) : base(e.Message)
{
;
}
}
static void T() {
try
{
M();
}
catch(SystemException e)
{
throw new CustomException(e);
}
}
static void T() {
try
{
M();
}
catch(Exception e)
{
throw new CustomException();
}
}
{
public CustomException(Exception innerException)
: base("", innerException)
{ }
}
static void T() {
try
{
M();
}
catch(IndexOutOfRangeException e)
{
throw new CustomException(e);
}
catch(ArgumentException e)
{
throw new CustomException(e);
}
}
static void T()
{
try
{
M();
}
catch (ArgumentException e)
{
throw new CustomException();
}
catch (CustomException e)
{
throw new CustomException();
}
}
{
try
{
M();
}
catch (IndexOutOfRangeException e)
{
throw new CustomException(e);
}
catch (ArgumentException e)
{
throw new CustomException(e);
}
}
class CustomException : Exception
{
public CustomException(Exception innerException)
: base("", innerException)
{ }
}
{
public CustomException(IndexOutOfRangeException ex){}
public CustomException(ArgumentException ex) {}
}
static void T()
{
try
{
M();
}
catch(IndexOutOfRangeException ex)
{
throw new CustomException(ex);
}
catch(ArgumentException ex)
{
throw new CustomException(ex);
}
}
public Exception E { get; }
public CustomException(Exception e) : base() {
E = e;
}
}
static void T() {
try {
M();
} catch (Exception e) {
throw new CustomException(e);
}
}
{
public CustomException()
{
}
public CustomException(string message) : base(message)
{
}
}
static void T()
{
try
{
M();
}
catch (Exception exc)
{
throw new CustomException(exc.Message);
}
}
{
try
{
M();
}
catch (Exception ex)
{
throw new CustomException(ex.Message, ex);
}
}
[Serializable]
public class CustomException : Exception
{
public CustomException() { }
public CustomException(string message) : base(message) { }
public CustomException(string message, Exception inner) : base(message, inner) { }
protected CustomException(
System.Runtime.Serialization.SerializationInfo info,
System.Runtime.Serialization.StreamingContext context) : base(info, context) { }
}
{
public CustomException() { }
public CustomException(string message)
: base(message) { }
public CustomException(string message, Exception inner)
: base(message, inner) { }
public CustomException(Exception inner)
: this("", inner) { }
}
static void T() {
try {
M();
}
catch (Exception ex) {
if (ex is IndexOutOfRangeException || ex is ArgumentException) {
throw new CustomException(ex);
}
}
}
static void T() {
M();
try
{
}
catch(Exception ex)
{
throw (CustomException)ex;
}
}
static void T() {
try
{
M();
}
catch(Exception e)
{
throw new CustomException();
}
}
{
try
{
M();
}
catch (IndexOutOfRangeException ex)
{
throw new CustomException(ex);
}
catch (ArgumentException ex)
{
throw new CustomException(ex);
}
}
class CustomException : Exception{
public CustomException(Exception innerEx):base("", innerEx) { }
}
{
IndexOutOfRangeException index;
ArgumentException argument;
public CustomException(IndexOutOfRangeException i)
: base() {
index = i;
}
public CustomException(ArgumentException a)
: base()
{
argument = a;
}
}
static void T()
{
try
{
M();
}
catch (IndexOutOfRangeException exI)
{
throw new CustomException(exI);
}
catch (ArgumentException exA)
{
throw new CustomException(exA);
}
}
static void T() {
try
{
M();
}
catch(Exception ex)
{
CustomException custEx = (CustomException)ex;
throw custEx;
}
}
{
public CustomException(Exception innerException)
: base("", innerException)
{
}
}
static void T()
{
try
{
M();
}
catch (IndexOutOfRangeException e)
{
throw new CustomException(e);
}
catch (ArgumentException e)
{
throw new CustomException(e);
}
}
{
public CustomException(Exception innerException) : base("", innerException) { }
}
static void T()
{
try
{
M();
}
catch (IndexOutOfRangeException ex)
{
throw new CustomException(ex);
}
catch (ArgumentException ex)
{
throw new CustomException(ex);
}
}
{
public CustomException (Exception innerException)
: base("", innerException)
{}
}
static void T() {
try
{
M();
}
catch(IndexOutOfRangeException e)
{
throw new CustomException(e);
}
catch(ArgumentException e)
{
throw new CustomException(e);
}
}
static void T() {
M();
}
public static void T()
{
try
{
M();
}
catch (CustomException)
{
throw new CustomException();
}
}
public class CustomException : Exception
{
public CustomException() { }
public CustomException(string message) : base(message) { }
public CustomException(string message, Exception inner) : base(message, inner) { }
protected CustomException(
System.Runtime.Serialization.SerializationInfo info,
System.Runtime.Serialization.StreamingContext context) : base(info, context) { }
}
static void T() {
try {
M();
}
catch(IndexOutOfRangeException ex){
throw new CustomException("Index out of range", ex);
}
catch(ArgumentException ex){
throw new CustomException("Argument exception", ex);
}
}
{
public CustomException(Exception innerException)
: base("", innerException)
{}
}
static void T() {
try
{
M();
}
catch(IndexOutOfRangeException e)
{
throw new CustomException(e);
}
catch(ArgumentException e)
{
throw new CustomException(e);
}
}
{
public CustomException(Exception innerException)
: base("", innerException)
{
}
}
static void T()
{
try
{
M();
} catch (ArgumentException ae)
{
throw new CustomException(ae);
} catch (IndexOutOfRangeException ei)
{
throw new CustomException(ei);
}
}
{
public CustomException(Exception innerException) : base("", innerException) { }
}
static void T()
{
try
{
M();
}
catch(Exception e)
{
throw new CustomException(e);
}
}
{
public CustomException()
{
}
public CustomException(string message)
: base(message)
{
}
public CustomException(string message, Exception inner)
: base(message, inner)
{
}
}
static void T()
{
try
{
M();
}
catch (Exception e)
when (e is CustomException || e is ArgumentException)
{
new CustomException(e.Message, e);
}
}
try
{
M();
}
catch (System.Exception)
{
throw new CustomException();
}
}
class CustomException : Exception
{
public CustomException() : base("Custom exception!")
{
}
}
{
try
{
M();
}
catch (IndexOutOfRangeException e)
{
throw new CustomException(e);
}
catch (ArgumentException e)
{
throw new CustomException(e);
}
}
class CustomException : Exception
{
public CustomException(Exception innerException)
: base("", innerException)
{ }
}
{
public CustomException(Exception innerException)
:base("", innerException)
{}
}
static void T()
{
try
{
M();
}
catch (IndexOutOfRangeException ex)
{
throw new CustomException(ex);
}
catch (ArgumentException ex)
{
throw new CustomException(ex);
}
}
{
public CustomException(Exception e) : base(e.Message)
{
;
}
}
static void T() {
try
{
M();
}
catch(SystemException e)
{
throw new CustomException(e);
}
}