Coder Social home page Coder Social logo

Comments (5)

daleswift avatar daleswift commented on May 27, 2024 1

Steps to reproduce:

  • Create any iOS project and call Crashes.trackError
  • Check the results in AppCenter
  • The error is listed as originating in MSACExceptionModel.initWithError rather than from the actual calling code (in my example it should be ViewController.sendErrorButtonTapped)

I'm attaching a sample project. You need to replace line 16 in AppDelegate.swift
static let appCenterSecret = "your app secret here"
with a valid AppCenter secret.

Run the app and tap Send Error several times

BugSplatStoryBoard.zip

from appcenter-sdk-apple.

MikhailSuendukov avatar MikhailSuendukov commented on May 27, 2024 1

You can implement it in this way. In the screenshot you can see how the data in the stack trace is displayed on the portal.

    let model = ExceptionModel(withType: "MyExceptionType", exceptionMessage: "ExceptionCustomMessage", stackTrace: ["firstline fileName1 address1 className1 methodName1 somedata", "secondline fileName2 address2 className2 methodName2 somedata", "thirdline fileName2 address2 className2 methodName2 somedata"])!
    Crashes.trackException(model, properties: nil, attachments: nil)

Screenshot 2023-11-06 at 15 24 07

from appcenter-sdk-apple.

MikhailSuendukov avatar MikhailSuendukov commented on May 27, 2024

Hi @daleswift and thanks for reaching out to us, could you please provide us with the steps to reproduce your error?

from appcenter-sdk-apple.

MikhailSuendukov avatar MikhailSuendukov commented on May 27, 2024

I apologize for the delay, the fact is that if the stack trace generation format does not suit you, then it is possible to send your MCAExceptionModel with a defined stack trace. Therefore, your workaround is an architecturally expected solution. I will close this issue but if you have any additional questions feel free to reopen it.

from appcenter-sdk-apple.

radekwilczak avatar radekwilczak commented on May 27, 2024

Describe alternatives you've considered As a workaround, I am capturing a call stack myself and prepending a surrogate frame to include the actual failing method, then using the constructor ExceptionModel(withType:exceptionMessage:stacktrace)

@daleswift Could you share a code example how do you creating ExceptionModel?
I mean what you exactly you are putting in withType, exceptionMessage, stacktrace params?

from appcenter-sdk-apple.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.