aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.HLE/Exceptions/ServiceNotImplementedException.cs
diff options
context:
space:
mode:
authorAc_K <Acoustik666@gmail.com>2021-09-15 01:24:49 +0200
committerGitHub <noreply@github.com>2021-09-15 01:24:49 +0200
commit5d08e9b495a2315e8a4758a8123466665085d044 (patch)
tree54a189acc7d9589e9678cc431b1bc9cca40682d0 /Ryujinx.HLE/Exceptions/ServiceNotImplementedException.cs
parent3f2486342b3ef4610b6af6a52624614d2a7ad8ae (diff)
hos: Cleanup the project (#2634)
* hos: Cleanup the project Since a lot of changes has been done on the HOS project, there are some leftover here and there, or class just used in one service, things at wrong places, and more. This PR fixes that, additionnally to that, I've realigned some vars because I though it make the code more readable. * Address gdkchan feedback * addresses Thog feedback * Revert ElfSymbol
Diffstat (limited to 'Ryujinx.HLE/Exceptions/ServiceNotImplementedException.cs')
-rw-r--r--Ryujinx.HLE/Exceptions/ServiceNotImplementedException.cs32
1 files changed, 12 insertions, 20 deletions
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