diff --git a/GBase/Exceptions/MissingTableException.cs b/GBase/Exceptions/MissingTableException.cs
index 1d6015b..78af97c 100644
--- a/GBase/Exceptions/MissingTableException.cs
+++ b/GBase/Exceptions/MissingTableException.cs
@@ -9,20 +9,15 @@ namespace GBase.Exceptions
///
/// that the table for the given is missing
///
- public class MissingTableException : Exception
+ public class MissingTableException : Exception
{
///
/// that the table for the given is missing
///
- public MissingTableException(Type type)
- : base($"There is no table for type {type}.")
+ public MissingTableException()
+ : base($"There is no table for type {typeof(T)}.")
{
- Type = type;
+
}
-
- ///
- /// The that has no table
- ///
- public Type Type { get; }
}
}
\ No newline at end of file
diff --git a/GBase/GBase.cs b/GBase/GBase.cs
index 56ad1c0..3e43512 100644
--- a/GBase/GBase.cs
+++ b/GBase/GBase.cs
@@ -9,6 +9,7 @@ using System.Reflection;
using System.Threading;
using System.Threading.Tasks;
using GBase.Attributes;
+using GBase.Exceptions;
using GBase.Factories;
using GBase.Interfaces;
using GBase.Interfaces.Settings;
@@ -121,7 +122,7 @@ namespace GBase
{
IGBaseTable table = GetTable();
if (table == null)
- throw new Exception(); //TODO: Create exception
+ throw new MissingTableException();
return await table.AddEntry(entry, cancellationToken);
}
@@ -130,7 +131,7 @@ namespace GBase
{
IGBaseTable table = GetTable();
if (table == null)
- throw new Exception(); //TODO: Create exception
+ throw new MissingTableException();
await table.SetValue(entry, propertyName, value, cancellationToken);
}
@@ -139,7 +140,7 @@ namespace GBase
{
IGBaseTable table = GetTable();
if (table == null)
- throw new Exception(); //TODO: Create exception
+ throw new MissingTableException();
return await table.GetValue(entry, propertyName, cancellationToken);
}
diff --git a/GBase/GBaseObject.cs b/GBase/GBaseObject.cs
index 5ff272e..44af228 100644
--- a/GBase/GBaseObject.cs
+++ b/GBase/GBaseObject.cs
@@ -20,12 +20,12 @@ namespace GBase
///
/// GBase object that allows conversion from
///
- /// No table for is existing
+ /// No table for is existing
protected GBaseObject(IGBase gBase)
{
_gBaseTable = gBase.GetTable();
if (_gBaseTable == null)
- throw new MissingTableException(typeof(T));
+ throw new MissingTableException();
}