summaryrefslogtreecommitdiff
path: root/src/vm/eventpipejsonfile.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/vm/eventpipejsonfile.cpp')
-rw-r--r--src/vm/eventpipejsonfile.cpp46
1 files changed, 9 insertions, 37 deletions
diff --git a/src/vm/eventpipejsonfile.cpp b/src/vm/eventpipejsonfile.cpp
index aa60df7b07..2edd6f4366 100644
--- a/src/vm/eventpipejsonfile.cpp
+++ b/src/vm/eventpipejsonfile.cpp
@@ -38,7 +38,7 @@ EventPipeJsonFile::~EventPipeJsonFile()
{
CONTRACTL
{
- NOTHROW;
+ THROWS;
GC_TRIGGERS;
MODE_ANY;
}
@@ -59,26 +59,14 @@ EventPipeJsonFile::~EventPipeJsonFile()
void EventPipeJsonFile::WriteEvent(EventPipeEventInstance &instance)
{
- CONTRACTL
- {
- NOTHROW;
- GC_NOTRIGGER;
- MODE_ANY;
- }
- CONTRACTL_END;
+ STANDARD_VM_CONTRACT;
instance.SerializeToJsonFile(this);
}
void EventPipeJsonFile::WriteEvent(LARGE_INTEGER timeStamp, DWORD threadID, SString &message, StackContents &stackContents)
{
- CONTRACTL
- {
- NOTHROW;
- GC_NOTRIGGER;
- MODE_ANY;
- }
- CONTRACTL_END;
+ STANDARD_VM_CONTRACT;
if(m_pFileStream == NULL || m_writeErrorEncountered)
{
@@ -110,7 +98,7 @@ void EventPipeJsonFile::Write(SString &str)
{
CONTRACTL
{
- NOTHROW;
+ THROWS;
GC_TRIGGERS;
MODE_ANY;
}
@@ -118,35 +106,19 @@ void EventPipeJsonFile::Write(SString &str)
StackScratchBuffer scratch;
const char * charStr = str.GetANSI(scratch);
+ ULONG inCount = str.GetCount();
+ ULONG outCount;
+ m_pFileStream->Write(charStr, inCount, &outCount);
- EX_TRY
- {
- ULONG inCount = str.GetCount();
- ULONG outCount;
-
- m_pFileStream->Write(charStr, inCount, &outCount);
-
- if(inCount != outCount)
- {
- m_writeErrorEncountered = true;
- }
- }
- EX_CATCH
+ if(inCount != outCount)
{
m_writeErrorEncountered = true;
}
- EX_END_CATCH(SwallowAllExceptions);
}
void EventPipeJsonFile::FormatCallStack(StackContents &stackContents, SString &resultStr)
{
- CONTRACTL
- {
- NOTHROW;
- GC_NOTRIGGER;
- MODE_ANY;
- }
- CONTRACTL_END;
+ STANDARD_VM_CONTRACT;
StackScratchBuffer scratch;
SString frameStr;