Code development platform for open source projects from the European Union institutions

Skip to content
Snippets Groups Projects
Commit 36f5b7d2 authored by Michael KRISPER's avatar Michael KRISPER
Browse files

annotations for easier debugging in SI and VectoException

parent b388a8a2
No related branches found
No related tags found
No related merge requests found
using System;
using System.IO;
using JetBrains.Annotations;
namespace TUGraz.VectoCore.Exceptions
{
......@@ -7,6 +8,10 @@ namespace TUGraz.VectoCore.Exceptions
{
public VectoException(string message) : base(message) {}
public VectoException(string message, Exception innerException) : base(message, innerException) {}
[StringFormatMethod("message")]
public VectoException(string message, params object[] args)
: base(string.Format(message, args)) {}
}
public abstract class FileIOException : VectoException
......
......@@ -495,6 +495,7 @@ namespace TUGraz.VectoCore.Utils
/// Creates the specified special SI object.
/// </summary>
/// <param name="val">The value of the SI object.</param>
[DebuggerHidden]
public static T Create(double val)
{
RuntimeHelpers.RunClassConstructor(typeof(T).TypeHandle);
......@@ -749,6 +750,7 @@ namespace TUGraz.VectoCore.Utils
/// <param name="reciproc">if set to <c>true</c> then the object is in reciproc mode (1/...)</param>
/// <param name="reverse">if set to <c>true</c> then the object is in reverse convertion mode (e.g. rpm/min => rad/s).</param>
/// <param name="exponent">The exponent for further conversions (e.g. Square.Meter).</param>
[DebuggerHidden]
protected SI(double val, IEnumerable<Unit> numerator, IEnumerable<Unit> denominator, bool reciproc = false,
bool reverse = false, int exponent = 1)
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment