aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.HLE/Exceptions
diff options
context:
space:
mode:
Diffstat (limited to 'Ryujinx.HLE/Exceptions')
-rw-r--r--Ryujinx.HLE/Exceptions/InternalServiceException.cs2
-rw-r--r--Ryujinx.HLE/Exceptions/InvalidFirmwarePackageException.cs2
-rw-r--r--Ryujinx.HLE/Exceptions/InvalidNpdmException.cs2
-rw-r--r--Ryujinx.HLE/Exceptions/InvalidStructLayoutException.cs6
-rw-r--r--Ryujinx.HLE/Exceptions/ServiceNotImplementedException.cs32
-rw-r--r--Ryujinx.HLE/Exceptions/TamperCompilationException.cs2
-rw-r--r--Ryujinx.HLE/Exceptions/TamperExecutionException.cs2
7 files changed, 20 insertions, 28 deletions
diff --git a/Ryujinx.HLE/Exceptions/InternalServiceException.cs b/Ryujinx.HLE/Exceptions/InternalServiceException.cs
index b940c51c..85de63a6 100644
--- a/Ryujinx.HLE/Exceptions/InternalServiceException.cs
+++ b/Ryujinx.HLE/Exceptions/InternalServiceException.cs
@@ -6,4 +6,4 @@ namespace Ryujinx.HLE.Exceptions
{
public InternalServiceException(string message) : base(message) { }
}
-}
+} \ No newline at end of file
diff --git a/Ryujinx.HLE/Exceptions/InvalidFirmwarePackageException.cs b/Ryujinx.HLE/Exceptions/InvalidFirmwarePackageException.cs
index bddd827a..d08de581 100644
--- a/Ryujinx.HLE/Exceptions/InvalidFirmwarePackageException.cs
+++ b/Ryujinx.HLE/Exceptions/InvalidFirmwarePackageException.cs
@@ -6,4 +6,4 @@ namespace Ryujinx.HLE.Exceptions
{
public InvalidFirmwarePackageException(string message) : base(message) { }
}
-}
+} \ No newline at end of file
diff --git a/Ryujinx.HLE/Exceptions/InvalidNpdmException.cs b/Ryujinx.HLE/Exceptions/InvalidNpdmException.cs
index c4036ea0..98675e42 100644
--- a/Ryujinx.HLE/Exceptions/InvalidNpdmException.cs
+++ b/Ryujinx.HLE/Exceptions/InvalidNpdmException.cs
@@ -6,4 +6,4 @@ namespace Ryujinx.HLE.Exceptions
{
public InvalidNpdmException(string message) : base(message) { }
}
-}
+} \ No newline at end of file
diff --git a/Ryujinx.HLE/Exceptions/InvalidStructLayoutException.cs b/Ryujinx.HLE/Exceptions/InvalidStructLayoutException.cs
index f4ccb7ba..2f03d13a 100644
--- a/Ryujinx.HLE/Exceptions/InvalidStructLayoutException.cs
+++ b/Ryujinx.HLE/Exceptions/InvalidStructLayoutException.cs
@@ -7,9 +7,9 @@ namespace Ryujinx.HLE.Exceptions
{
static readonly Type _structType = typeof(T);
- public InvalidStructLayoutException(string message) : base(message) {}
+ public InvalidStructLayoutException(string message) : base(message) { }
- public InvalidStructLayoutException(int expectedSize) :
- base($"Type {_structType.Name} has the wrong size. Expected: {expectedSize} bytes, Got: {Unsafe.SizeOf<T>()} bytes") {}
+ public InvalidStructLayoutException(int expectedSize)
+ : base($"Type {_structType.Name} has the wrong size. Expected: {expectedSize} bytes, got: {Unsafe.SizeOf<T>()} bytes") { }
}
} \ No newline at end of file
diff --git a/Ryujinx.HLE/Exceptions/ServiceNotImplementedException.cs b/Ryujinx.HLE/Exceptions/ServiceNotImplementedException.cs
index c9247cc1..3dbf48d8 100644
--- a/Ryujinx.HLE/Exceptions/ServiceNotImplementedException.cs
+++ b/Ryujinx.HLE/Exceptions/ServiceNotImplementedException.cs
@@ -19,37 +19,29 @@ namespace Ryujinx.HLE.Exceptions
public IpcMessage Request { get; }
public ServiceNotImplementedException(IpcService service, ServiceCtx context)
- : this(service, context, "The service call is not implemented.")
- { }
+ : this(service, context, "The service call is not implemented.") { }
- public ServiceNotImplementedException(IpcService service, ServiceCtx context, string message)
- : base(message)
+ public ServiceNotImplementedException(IpcService service, ServiceCtx context, string message) : base(message)
{
Service = service;
Context = context;
Request = context.Request;
}
- public ServiceNotImplementedException(IpcService service, ServiceCtx context, string message, Exception inner)
- : base(message, inner)
+ public ServiceNotImplementedException(IpcService service, ServiceCtx context, string message, Exception inner) : base(message, inner)
{
Service = service;
Context = context;
Request = context.Request;
}
- protected ServiceNotImplementedException(SerializationInfo info, StreamingContext context)
- : base(info, context)
- { }
+ protected ServiceNotImplementedException(SerializationInfo info, StreamingContext context) : base(info, context) { }
public override string Message
{
get
{
- return base.Message +
- Environment.NewLine +
- Environment.NewLine +
- BuildMessage();
+ return base.Message + Environment.NewLine + Environment.NewLine + BuildMessage();
}
}
@@ -63,8 +55,7 @@ namespace Ryujinx.HLE.Exceptions
if (callingType != null && callingMethod != null)
{
// If the type is past 0xF, we are using TIPC
- var ipcCommands = Request.Type > IpcMessageType.TipcCloseSession ?
- Service.TipcCommands : Service.HipcCommands;
+ var ipcCommands = Request.Type > IpcMessageType.TipcCloseSession ? Service.TipcCommands : Service.HipcCommands;
// Find the handler for the method called
var ipcHandler = ipcCommands.FirstOrDefault(x => x.Value == callingMethod);
@@ -82,9 +73,9 @@ namespace Ryujinx.HLE.Exceptions
sb.AppendLine(Context.Thread.GetGuestStackTrace());
// Print buffer information
- if (Request.PtrBuff.Count > 0 ||
- Request.SendBuff.Count > 0 ||
- Request.ReceiveBuff.Count > 0 ||
+ if (Request.PtrBuff.Count > 0 ||
+ Request.SendBuff.Count > 0 ||
+ Request.ReceiveBuff.Count > 0 ||
Request.ExchangeBuff.Count > 0 ||
Request.RecvListBuff.Count > 0)
{
@@ -149,11 +140,12 @@ namespace Ryujinx.HLE.Exceptions
return sb.ToString();
}
- private (Type, MethodBase) WalkStackTrace(StackTrace trace)
+ private static (Type, MethodBase) WalkStackTrace(StackTrace trace)
{
int i = 0;
StackFrame frame;
+
// Find the IIpcService method that threw this exception
while ((frame = trace.GetFrame(i++)) != null)
{
@@ -169,4 +161,4 @@ namespace Ryujinx.HLE.Exceptions
return (null, null);
}
}
-}
+} \ No newline at end of file
diff --git a/Ryujinx.HLE/Exceptions/TamperCompilationException.cs b/Ryujinx.HLE/Exceptions/TamperCompilationException.cs
index 370df5d3..02d87163 100644
--- a/Ryujinx.HLE/Exceptions/TamperCompilationException.cs
+++ b/Ryujinx.HLE/Exceptions/TamperCompilationException.cs
@@ -6,4 +6,4 @@ namespace Ryujinx.HLE.Exceptions
{
public TamperCompilationException(string message) : base(message) { }
}
-}
+} \ No newline at end of file
diff --git a/Ryujinx.HLE/Exceptions/TamperExecutionException.cs b/Ryujinx.HLE/Exceptions/TamperExecutionException.cs
index 1f132607..d62effe3 100644
--- a/Ryujinx.HLE/Exceptions/TamperExecutionException.cs
+++ b/Ryujinx.HLE/Exceptions/TamperExecutionException.cs
@@ -6,4 +6,4 @@ namespace Ryujinx.HLE.Exceptions
{
public TamperExecutionException(string message) : base(message) { }
}
-}
+} \ No newline at end of file