From 36f5b7d2ccf1a4371a71b14d4bf39f2573a1686b Mon Sep 17 00:00:00 2001
From: Michael Krisper <michael.krisper@tugraz.at>
Date: Mon, 31 Aug 2015 14:52:27 +0200
Subject: [PATCH] annotations for easier debugging in SI and VectoException

---
 VectoCore/Exceptions/VectoExceptions.cs | 5 +++++
 VectoCore/Utils/SI.cs                   | 2 ++
 2 files changed, 7 insertions(+)

diff --git a/VectoCore/Exceptions/VectoExceptions.cs b/VectoCore/Exceptions/VectoExceptions.cs
index 818972fb27..daa4a86c76 100644
--- a/VectoCore/Exceptions/VectoExceptions.cs
+++ b/VectoCore/Exceptions/VectoExceptions.cs
@@ -1,5 +1,6 @@
 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
diff --git a/VectoCore/Utils/SI.cs b/VectoCore/Utils/SI.cs
index b16d0aceba..fda1c43fa2 100644
--- a/VectoCore/Utils/SI.cs
+++ b/VectoCore/Utils/SI.cs
@@ -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)
 		{
-- 
GitLab